I have been trudging through the forum to find an answer that I don’t know has been resolved. I am trying to dynamically activate a main menu link while using the EE pages module version 1. I read through the “behind the curtain” series and saw the embed variable solution. However, that only worked if every page had a template and it’s own variable. I am using one static template and one weblog to handle 10-12 pages. Is there an article that discusses how I can make these talk to each other?
Thanks, derik
How about I post my own answer. This is how I got the dynamic linking to work. With the pages module you have exact control over the url. So if you have a page you create called newpage your url might look like this: www.yoursite.com/newpage. Because you have that kind of control you can lean on conditionals that look for segments in the url.
<ul > <li >New Page</li> </ul>
Basically this looks to see if the first segment in your url is “newpage”. If it is it adds the selected state. If not it keeps it unactive.
dookie,
That is what I would have suggested. It is situations like this were those segments can be a life saver. You can use similar stuff with tags that are dynamically built as well.
Like for instance showing the current entry from a list of entries created from an entries tag or something like that.
mmjaeger,
Are you wanting a dynamically generated menu with all of the valid pages links? I’m not sure what you were wanting.
Jamie
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.