BlackCatDevelopment / BlackCatCMS

BlackCat CMS is a PHP5, HTML5 content management system
https://blackcat-cms.org
Other
11 stars 9 forks source link

v1.3: move pagetree code from CAT_Backend::print_header #328

Closed webbird closed 7 years ago

webbird commented 8 years ago

The print_header() method contains all the code to fill the page tree in the backend. This should be removed, as it ties that method to the theme. (It renders the 'backend_pagetree_item.tpl' for every page.)

I'm not sure where to move this at the moment, but we will have to find a better place.

webbird commented 8 years ago

The Page helper adds some useful attributes to the pages array: (Example)

        [is_parent] => 
        [has_children] => 
        [is_editable] => 1
        [is_in_trail] => 
        [is_direct_parent] => 
        [is_current] => 
        [is_open] => 
        [be_tree_is_open] => 

is_parent - true if the page is parent of the current page (somewhere in the trail) has_children - true if the page has child pages is_editable - true if the current user is allowed to edit this page is_in_trail - true if the page is part of the current breadcrumb is_direct_parent - true if the page is the direct parent of the current page is_current - true if the page is the current page is_open - true if the page is visible in the current menu be_tree_is_open - same for the backend

webbird commented 7 years ago

This will be completely rewritten for BC2.