...
- ability to specify if created section would be visible in menu or not (currently by default section created based on template would be hidden in menu)
- ability to specify section order in menu (currently new section will always be added to the end)
- ability to specify url fragment for that section (currently it's auto-generated based on section name in the <NAME> node)
Solution
- add the "
CategoriesEventHandler::ensureCorrectPriority($priority, $parent_category_id)
" method that will:- if given value is positive multiply by "
-1
" - call "
CategoriesEventHandler::_getNextPriority
" method to get minimal allowed priority - if number given priority is smaller, than minimal allowed, then use minimal allowed one
- return priority
- if given value is positive multiply by "
- add "
IN_MENU
" node of "boolean" type - add "
ORDER
" node of "integer" type - add "
FILENAME
" node of "string" type - in theĀ "
CategoriesEventHandler::_prepareAutoPage
" method:- when "
IN_MENU
" is true, then set "IsMenu
" field to "1
" - when "
ORDER
" is specified, then call "CategoriesEventHandler::ensureCorrectPriority
" method to get actual priority value instead of calling "CategoriesEventHandler::_getNextPriority
") - when "
FILENAME
" is specified, then set "AutoFilename
" to "0
" and put specified value into "Filename
" field
- when "
Related Discussions
- [template parsercms] The template meta comments are not validated [5.2.2-B1] (blocker)