The simplest way to generate a variable navigation is to create a
navigation template and load it in the default layout.
You will see that layouts/default.vm does a $navigation.setTemplate(...)
Either you place your logic into the themplate that is named there.
Or you change it to use a reference to a filename that contains it.
Your screen cless or template file does
#set( $navigation = "navigations/yourFile.vm" )
Your layout class contains somewhere:
## load the side navigation
$navigation.setTemplate($navigation)
The navigations/yourFile.vm that is then loaded has the logic
to create what you want with all the power of the templating
language and the objects placed into the context (e.g. defines
some variables that indicate which menu point was selected;
this can also be extracted directly using a
#set( $selectedmenuItem = $data.Parameters.getString("yourMenuItemVariableName") )
Look at the navigations/DefaultBottom.vm file supplied with
the TDK.
Hope this clarified your questions...
:) Christoph
Gareth Coltman wrote:
>
> Sorry to bug like this, but I am still confused about creating navigation
> with Turbine. I was told that I could use layouts to control navigation, by
> making use of Default pages. But typically I may want my side nav to be
> slightly different on every page. Imagine I wanted the graphical link to the
> current page to be highlighted in the side menu for instance. Does this mean
> I have to have a layout for every page? This defeats the purpose of layouts
> imho.
>
> I have thought about having a $side_navigation_placeholder, but am not sure
> how I could implement this.
>
> Please help
>
> Gareth
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]