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: -
Any suggestions gratefully received!
Regards
Alec
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>
Regards
Alec
Comment