geniestreiche Posted October 15, 2012 Share Posted October 15, 2012 A few days ago some of us discussed the philosophy behind the action links in the contao/pw-tree (http://processwire.c...-love-pws-tree/). Sometimes i found it useful in contao to have a shortlink to publish/unpublish a page. So i came up with the idea to make a module for this task. I wouldn't call me a programmer so i take the code from ryan's pageprocessclone (http://modules.proce...ess-page-clone/) an nico's pageprocessdelete (http://modules.proce...ss-page-delete/) as a starting point. thank you for your great work. Both modules adding a link to the page list. ProcessPageHidden adding a "hidden" link to the list and changes the status of a page to hidden/unhidden. https://github.com/g...ocessPageHidden ProcessPagePublish adding a "publish" link to the list and changes the status of a page to publish/unpublish. https://github.com/g...cessPagePublish Maybe someone would find it useful too and there are not so much bugs in the code. 5 Link to comment Share on other sites More sharing options...
ryan Posted October 16, 2012 Share Posted October 16, 2012 Looks good, thanks for your module submissions geniestreiche. Link to comment Share on other sites More sharing options...
kongondo Posted April 7, 2013 Share Posted April 7, 2013 Hi geniestreiche, Thanks for these modules. I was wondering if it would be better to toggle the pageListActionLabel labels depending on the status of that page. So, show label "hide" if page is not hidden and show "unhide" if page is hidden. Same for the published status, i.e. show "publish" if page is not published and "unpublish" if page is published. Visually, this makes more sense to me. I am no coder but I've made quick dirty hacks in local copies of the module to do just this. See attachment. I'm sure your code will be cleaner than mine . Many thanks. Cheers /k 3 Link to comment Share on other sites More sharing options...
geniestreiche Posted April 11, 2013 Author Share Posted April 11, 2013 hi kongondo, yes your suggestion make sense. first i thought the changes on the page title were enough (color, line-through). but maybe the toggle of the label is one step smarter . i updated the repos on github. i don't know whether the code changes are efficent than i am not a coder too . greetings... 1 Link to comment Share on other sites More sharing options...
kongondo Posted April 11, 2013 Share Posted April 11, 2013 Brilliant! Thanks Jens Dankeschön! Link to comment Share on other sites More sharing options...
wumbo Posted November 23, 2015 Share Posted November 23, 2015 I just added the line $page->status = Page::statusHidden; to the ___install() method of the plugin. This prevents the page from being displayed in the sub menu of the Pages item of the editors main menu. I'm using ProcessWire v2.6.1. Link to comment Share on other sites More sharing options...
adrian Posted November 23, 2015 Share Posted November 23, 2015 I just added the line $page->status = Page::statusHidden; to the ___install() method of the plugin. This prevents the page from being displayed in the sub menu of the Pages item of the editors main menu. I'm using ProcessWire v2.6.1. The latest version of PW has built-in hide/unhide and pub/unpub action buttons, so I don't actually think there is a need for this module anymore. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now