Changes between Version 4 and Version 5 of S3/S3Navigation


Ignore:
Timestamp:
03/05/12 12:49:46 (13 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Navigation

    v4 v5  
    6868All other keyword parameters will be stored in the item instance and passed on to the {{{layout}}} method - keywords starting with an "_" underscore will be stored in {{{item.attributes}}}, all other keywords in {{{item.options}}} (it is up to the layout method to deal with those then).
    6969
    70 === Processing Navigation Items ===
     70=== Item Status ===
    7171
    72 When navitation item instances get processed, they receive a set of status flags which then are available for the renderer:
    73 
    74 ||='''Flag'''=||='''Meaning'''=||='''Comments'''=||
    75 ||item.enabled||The item shall be rendered as enabled (accessible)||renderers would usually skip items with enabled=False, but could also render them greyed-out or otherwise visible but inaccessible; this flag will be altered by the return value of the check-hooks, and can be overridden by the check_enabled method of the class||
    76 ||item.selected||The target URL of the item or any of its sub-items matches the current request||this can be used for menu highlighting; if more than one subtree can be matched, only items in the first matching subtree will be marked selected||
    77 ||item.authorized||The user is permitted to access the target URL of this item||renderers would usually skip items the user is not permitted to access, but could also render the item greyed-out or otherwise visible but inaccessible||
    78 ||item.visible||Custom flag to show/hide items||will always be True unless explicitly changed by a check-hook method||
    79 
    80 S3Navigation items are run through a cascade of status checks:
     72S3Navigation items are run through a cascade of status checks before they get handed over to the layout method:
    8173
    8274||='''Method'''=||='''Meaning'''=||='''Effect'''=||='''Flag set'''=||
     
    8981The default behavior of these methods is meant for menu items, which may though not fit for all types of navigation items. Where needed, the subclass should overwrite them accordingly. These methods won't take any parameter beyond {{{self}}} and are expected to return a boolean value.
    9082
     83During the status check cascade, each navigation item receives a set of status flags which then are available for the renderer:
     84
     85||='''Flag'''=||='''Meaning'''=||='''Comments'''=||
     86||item.enabled||The item shall be rendered as enabled (accessible)||renderers would usually skip items with enabled=False, but could also render them greyed-out or otherwise visible but inaccessible; this flag will be altered by the return value of the check-hooks, and can be overridden by the check_enabled method of the class||
     87||item.selected||The target URL of the item or any of its sub-items matches the current request||this can be used for menu highlighting; if more than one subtree can be matched, only items in the first matching subtree will be marked selected||
     88||item.authorized||The user is permitted to access the target URL of this item||renderers would usually skip items the user is not permitted to access, but could also render the item greyed-out or otherwise visible but inaccessible||
     89||item.visible||Custom flag to show/hide items||will always be True unless explicitly changed by a check-hook method||
     90
     91It is up to the layout method whether and how each combination of flags influences the rendering of the item.
    9192=== Rendering Navigation Items ===
    9293