Dynamic Links?????

Author Message

Douglas Johnson

Friday 11 July 2003 1:18:44 pm

How can I create dynamic links based on the users previous link selections? Example: I have a template with 3 navigation areas. A top horizontal nav bar, a left nav bar and a right nav bar. The user selects "link 1" on the top nav bar, this changes the left nav bar links. I realize this can be done by linking each nav bar link to a separate template but I don't want to create dozens of templates. How can I "capture" the users node selection and based on that, link to the appropriate child? Thanks in advance.

Karsten Jennissen

Friday 11 July 2003 1:47:29 pm

Hi,

you can do that by using a site hierarchy where each main node under the root folder has a set of sub nodes and where the main nodes are displayed in the top nav and the sub nodes of each main node is displayed in the left nav. Seems to me that this is kind of what you want, right?

Anyway, with this hierarchy it is easy to just use one template. In the top nav you use a fetch with parent node of the root folder + section loop over the result. In the left nav you do a fetch of all nodes where the parent node is the currently selected node + a section loop over the results.

If you have no clue what I am talking about :-), take a look here:
http://ez.no/developer/ez_publish_3/documentation/customization/custom_design
and here:
http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks

Karsten

Douglas Johnson

Friday 11 July 2003 2:18:45 pm

Ok, I think I understand.....but how do I get the ID of the currently selected node? Please bare with me:-) I'm new to all of this. Thanks.

Karsten Jennissen

Friday 11 July 2003 2:40:22 pm

You can get the current node_id with
{$module_result.node_id}

Some more info here:
http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/fetching_the_id_of_the_parent

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.