We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Active linking vs. Page Module

Development and Programming

dookie's avatar
dookie
19 posts
17 years ago
dookie's avatar dookie

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

       
mmjaeger's avatar
mmjaeger
78 posts
17 years ago
mmjaeger's avatar mmjaeger

I’m having the same problems - any how-to available somewhere?

Thank you

       
dookie's avatar
dookie
19 posts
17 years ago
dookie's avatar dookie

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.

       
mmjaeger's avatar
mmjaeger
78 posts
17 years ago
mmjaeger's avatar mmjaeger

thank you for your input - however, I was more refering to how to build the navigation using the pages module. thanks anyway

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

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

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.