Announcement

Collapse
No announcement yet.

Section Menu - help please

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

    Section Menu - help please

    Hello,

    I've been having fun using conditions in layouts to build a nice section menu.

    Basically I've got it displaying all 1st and 2nd level sections. I have then added a new variable at section level called SubSectionNumber. Using this variable I expand the menu to show the relevant 3rd level sections.

    In addition to the above, I am reading the SectionID variable to highlight the selected section to Red.

    Now comes the tricky part ( for me anyway! )

    When the user navigates beyond level 3 in the store, I'd still like to have the parent level 3 section highlighted in red.

    You can see the results of my efforts here: -
    http://www.calgarydirect.co.uk/acatalog/test/acatalog/

    The only section populated beyond level 3 at the moment is 'Garden Machinery > Lawnmowers > Petrol Lawnmowers'

    As you will see, as soon as you select a section beyond level 3, I lose my highlight. I can see why my code does not do the job, I just cannot get my head round how to make it work...

    Here is my section menu layout: -

    Code:
           <table>
           <actinic:block type="EntireSectionList">
              <actinic:block if="%3cactinic%3avariable%20name%3d%22SubSectionNumber%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSubSectionNumber%22%20%2f%3e" >
              
                <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%201" >
                  <tr><td class="navindent1" width="151"><a href="<actinic:variable name="SectionPageName"/>" target="_self" class="product_section">
                      <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" >
    						  <font color="#EF3C3A">
    						</actinic:block>
    							<actinic:variable name='SectionName'/>
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e" >
    						  </font>
    						</actinic:block>	
    				  </a></td></tr>
                </actinic:block>
    
                <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202">
                  <tr><td class="navindent2" width="151"><a href="<actinic:variable name="SectionPageName"/>" target="_self"  class="product_sectionsub">
                      <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" >
    						  <font color="#EF3C3A">
    						</actinic:block>
    							<actinic:variable name='SectionName'/>
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e" >
    						  </font>
    						</actinic:block>	
                  </a></td></tr>
                </actinic:block>
    
                <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%203" >
                  <tr><td class="navindent3" width="151"><a href="<actinic:variable name="SectionPageName"/>" target="_self"  class="product_sectionsubsub">
                      <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" >
    						  <font color="#EF3C3A">
    						</actinic:block>
    							<actinic:variable name='SectionName'/>
                      <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" >
    						  </font>
    						</actinic:block>	
                  </a></td></tr>
                </actinic:block>
    
              </actinic:block>
              
              <actinic:block if="%3cactinic%3avariable%20name%3d%22SubSectionNumber%22%20%2f%3e%20%21%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSubSectionNumber%22%20%2f%3e" >
              
                <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%201" >
                  <tr><td class="navindent1" width="151"><a href="<actinic:variable name="SectionPageName"/>" target="_self" class="product_section">
                      <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" >
    						  <font color="#EF3C3A">
    						</actinic:block>
    						<actinic:variable name='SectionName'/>
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e" >
    						  </font>
    						</actinic:block>						
                  </a></td></tr>
                </actinic:block> 
                
                <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202">
                  <tr><td class="navindent2" width="151"><a href="<actinic:variable name="SectionPageName"/>" target="_self"  class="product_sectionsub">
                      <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" >
    						  <font color="#EF3C3A">
    						</actinic:block>
    							<actinic:variable name='SectionName'/>
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e" >
    						  </font>
    						</actinic:block>	
                  </a></td></tr>
                </actinic:block>
          
              </actinic:block>
              
            </actinic:block>
            </table>
    Any suggestions gratefully received!

    Regards

    Alec
    Alec Moss
    Business Webpage Ltd
    Web Design
    Starter Websites

    #2
    Hi Alec

    I tried playing with your code, but it's a bit tricky without the CSS.

    The issue is that you need the highlighting to be controlled by a variable that is inherited down the sections. Unfortunately, SectionID is unique to each section.

    Take a look at my last post in http://community.actinic.com/showthr...=SectionNumber

    It talks about creating a User-Definable variable called 'SectionNumber' - which can be inherited from parent sections to child sections, and so keep the parent section highlighted in the tree when viewing a child section.

    What you need to is amend your conditions to use 'OR' i.e. 'SectionID equals MainSection::SectionID OR SectionNumber equals MainSection::SectionNumber'

    Comment

    Working...
    X