Announcement

Collapse
No announcement yet.

hightlight section nav

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    hightlight section nav

    Use the following expression within some 'block if' tags that surround the code you are using to do the highlighting...

    Quote:
    <actinic:variable name="SectionID" /> == <actinic:variable name="MainSection::SectionID" />
    This will validate to 'true' if the ID of the section in the section link is the same as the ID of the current section.

    I love conditions
    I found the above posted by ChrisD, which i think is telling me how to mark my left hand nav with the current page open ie what i want to do is have a pretty arrow beside my left nav nav which indicates which page you are on see image to illustrate.

    But where do i put the block if
    Attached Files

    #2
    Ok I've had a think and found the right place...

    Edit list layout in the nav, but on adding
    Code:
    <ul class="products"><li><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e">
    <img src="search-arrow.gif"/>	
    </actinic:block>
    i get the arrow on every nav item and not just the one i am at

    Comment


      #3
      Jo,

      Here's our working code which we just popped inside a new layout and inserted it where we wanted it. It's got all out css etc in it but should be easy to amend. It tests for a variable of Department Tracker Image (set at the section level and Use parent set so it filters down) and if it equals itself chucks in an arrow image, and applies a css class to highlight the section too. you will obviously have to create your own section level variable for your site.

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27" ><actinic:block type="EntireSectionList" ><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionNumber%22%20%2f%3e" ><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%201" ><h2><a href="<actinic:variable name="SectionPageName"/>" title="<actinic:variable name="SectionName" />"<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Outdoor%20Equipment%27">class="outdoorheaderlink" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Sports%20Equipment%27" >class="sportsheaderlink" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Printing%20%26%20Embroidery%27">class="uniformheaderlink" </actinic:block>><actinic:variable name='SectionName'/></a></h2></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202" ><h3><a href="<actinic:variable name="SectionPageName"/>" title="<actinic:variable name="SectionName" />"<actinic:block if="%3cactinic%3avariable%20name%3d%22DEPARTMENT%5fTRACKER%5fIMAGE%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aDEPARTMENT%5fTRACKER%5fIMAGE%22%20%2f%3e" >class="activelink" </actinic:block>><actinic:block if="%3cactinic%3avariable%20name%3d%22DEPARTMENT%5fTRACKER%5fIMAGE%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aDEPARTMENT%5fTRACKER%5fIMAGE%22%20%2f%3e" ><img src="arrowrightgreynav.gif" height="7" width="9" border="0" alt="" /></actinic:block><actinic:variable name='SectionName'/></a></h3></actinic:block></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%21%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionNumber%22%20%2f%3e" ><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%201" ><h2><a href="<actinic:variable name="SectionPageName"/>" title="<actinic:variable name="SectionName" />"<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Outdoor%20Equipment%27">class="outdoorheaderlink" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Sports%20Equipment%27" >class="sportsheaderlink" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNumber%22%20%2f%3e%20%3d%3d%20%27Printing%20%26%20Embroidery%27">class="uniformheaderlink" </actinic:block>><actinic:variable name='SectionName'/></a></h2></actinic:block></actinic:block></actinic:block></actinic:block><!-- End Actinic Generated Links -->
      However, we found this way to slow for uploading. So ended up hard coding the nav likey so:-

      Code:
      <a href="http://www.yoursite.co.uk/acatalog/section1.html" title="Section 1"<actinic:block if="%3cactinic%3avariable%20name%3d%22DEPARTMENT%5fTRACKER%5fIMAGE%22%20%2f%3e%20%3d%3d%20%22section1%2egif%22"> class="activelink"><img width="9" height="7" border="0" alt="" src="arrowrightgreynav.gif"/</actinic:block>>Section 1</a>
      Our variable checks for a unique image so might confuse this, but basically you just need a varibable on each section with a unique value.

      Hope this makes sense, too late for working on code like this
      Cheers

      David
      Located in Edinburgh UK

      http://twitter.com/mcfinster

      Comment


        #4
        Jo - don't forget that site has discreet variables set against each section and brochure page - could you not incorporate those into your condition?


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment

        Working...
        X