Hi Paul,
[quote]In "Inheritable components" the structure has changed. What is shown as
"Site Definitions" has been changed to "Site Configuration"[/quote]
This is a difference between the enterprise and community editions. EE supports
multiple "Site Definitions". CE supports only one "Site Configuration". It's
just naming, you can still use inheritance. The nodes are in Templating Kit >
Site Configuration > /templates/prototype/areas/<area name> in CE.
[quote]I would like to override horizontalNavigation[/quote]
Navigation is not an area. It is configured in /templates/prototype/navigation.
It is not editable either but automatically generated from the site structure.
The usual inheritance benefit "edit on parent, not on children" does not really
apply here.
Suppose you want horizontal navi to behave differently in one section. In EE
you could create a second site definition, configure your custom navi in it,
and apply it to the section. In CE you have only one site definition so you
need a workaround. Copy an existing template definition (stkSection) and define
your custom navi under it. Apply it to pages where navigation should behave
differently.
Example: In Templating Kit > Template Definitions
[code]
+ pages
+ stkSectionNoHorizontalNavigation (this is your custom template def!)
+ navigation
+ horizontal
- enabled=false
[/code]
Through configuration you can define behavior such as the number of levels
displayed. If you want to change the business logic you need a custom
navigation model class. Extend the default STK class or write your own.
See horizontalNavigation.ftl on how the model is accessed from the script. You
can define your own context attribute, available to the script. See
Configuration >
/modules/standard-templating-kit/renderers/stk/contextAttributes for examples.
[code]
+ renderers
+ stk
+ contextAttributes
+ myNavigationUtil
- componenClass=path.to.myNavigationUtil
- name=myNavigationUtil
[/code]
In the script, get the model from the context attribute with [#assign
navigation = myNavigationUtil.navigation.horizontalNavigation/].
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=b053bc2d-a685-40b0-81b7-cefbc5208b5d
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------