JJSApprovePage
Questions answered by this recipe
How can I prevent jjscms from publishing some pages?
Description
Action jjsapprovepage
controls the page attribute "jjsApprovePageRev".
When a page is to be published by JjsCMS it looks at this attribute to see if publishing is allowed.
The value of "jjsApprovePageRev" can be
- a positive number
- must be the same as jjsEditRev (see JJSEditRev)
If JJSEditRev is not installed, only the following values will work -1
- prevents publishing
any
- allows publishing of any revision
Installation
Download jjsapprovepage1_2.phpΔ and save it in your cookbook directory
add to local/config.php
include_once($FarmD . '/cookbook/jjsapprovepage1_2.php');
Page Variable
Password
Action jjsapprovepage can be password protected. The password is empty by default.
Edit Bar
The following actions could be useful in your Site.EditBar or Group.EditBar or Site.TopPageMenu
(:if expr equal {$jjsEditRev} {$jjsApprovePageRev} || equal 'any' {$jjsApprovePageRev}:) * [[{$Name}?action=jjscmspublish | $[Publish Page] ]] * [[{$Name}?action=jjsapprovepage&jjsApprovePageRev=-1 | $[Revoke Approval] ]](:ifend:) (:if expr ! equal {$jjsEditRev} {$jjsApprovePageRev}:) * [[{$Name}?action=jjsapprovepage&jjsApprovePageRev={$jjsEditRev} | $[Approve Page Rev {$jjsEditRev}] ]] (:ifend:) (:if expr ! equal 'any' {$jjsApprovePageRev}:) * [[{$Name}?action=jjsapprovepage&jjsApprovePageRev=any | $[Approve Any Rev] ]] (:ifend:)
Notes
Release Notes
2006-03-18 1.0 Initial release
2006-03-19 1.1 Bugfix: if jjsEditRev is not present, it must be set on approval
2006-03-23 1.2 don't reset auth state in session when saving new attribute value
Comments
See Also
Contributors
Comments
See discussion at JJSApprovePage-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.