ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Pagelist issue in navigation

July 21, 2012 7:50am

Subscribe [2]
  • #1 / Jul 21, 2012 7:50am

    k2zs

    114 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:

    <!-- START: Main Nav -->
    <div class="menu">
     <ul>
      <li><a href="http://{site_url}%22class=%22active" title="Home" class="active">Home</a></li>
      {exp:pageslist}
      <li><a href="http://{path={pageslist_page_uri}}%22class=%22active" title='{pageslist_page_title}' class="active">{pageslist_page_title}</a></li>
      {/exp:pageslist}
     </ul>
    </div>
    <!-- END: Main Nav -->
  • #2 / Jul 23, 2012 1:50pm

    Kyle Cotter

    730 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="http://path">"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.

  • #3 / Jul 23, 2012 5:37pm

    k2zs

    114 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 😊

  • #4 / Jul 24, 2012 12:03pm

    Kyle Cotter

    730 posts

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

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases