EllisLab text mark
Advanced Search
     
Pagelist issue in navigation
Posted: 21 July 2012 07:50 AM   [ Ignore ]
Avatar
Joined: 2010-10-23
160 posts

I have searched the docs but can’t find anything on the {exp:pageslist} tag, has that been depreciated since 2.3.x?

All I’m trying to do is set an “active” class in my navigation based upon segment_1. What am I doing wrong? Is there a better way?

pageslist_page_uri returns the uri with a leading slash so it never matches segment_1…

Here is my code:

<!-- STARTMain Nav -->
<
div class="menu">
 <
ul>
  <
li><a href="{site_url}"class="active" title="Home">Home</a></li>
  
{exp:pageslist}
  
<li><a href='{path={pageslist_page_uri}}'class="active" title='{pageslist_page_title}'>{pageslist_page_title}</a></li>
  
{/exp:pageslist}
 
</ul>
</
div>
<!-- 
ENDMain Nav --> 
 Signature 

Scott, K2ZS
My amateur radio page

 
Posted: 23 July 2012 01:50 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-19
777 posts

Hey Scott,

{exp:pageslist} 

is an add-on tag, and not part of ExpressionEngine proper. Perhaps you’re referring to this add-on of the same name?

To establish whether to add a class of active, would something like this work?

<a href="[path here]"class="active">[Link Name]</a

If you’re having issues with that particular add-on, you’ll need to reach out to the developer of the add-on, as we don’t support such.

Thanks.

 Signature 

18. Lover of the web. Pixel placer. Coffee Drinker. Owner of Cotter Interactive.

 
Posted: 23 July 2012 05:37 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2010-10-23
160 posts

Thanks Kyle,

That explains why it wasn’t in the docs, lol… Since I couldn’t get he active page/class working in my project using that extension I opted to use the regular exp:channel tag to output my menu. I was able to set the active class based upon uri segment AND it’s persistent through sub pages which I believe pagelist couldn’t do. All’s well that ends well smile

 Signature 

Scott, K2ZS
My amateur radio page

 
Posted: 24 July 2012 12:03 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-19
777 posts

Glad to see you’re up and running, Scott! If you have any more questions, feel free to start a new thread.

Thanks!

 Signature 

18. Lover of the web. Pixel placer. Coffee Drinker. Owner of Cotter Interactive.