Hi everyone.
This is my first ever post on the forum. I've been using Actinic for about 4 months and have found the forum invaluable so far - thanks to everyone involved!
My current issue involves trying to get a static menu to display the child sections of the current section. For example, if I'm in section 2 - the menu will look like this:
Section 1
Section 2
Sub-Section 2a
Sub-Section 2b
Sub-Section 2c
Section 3
Section 4
I've read loads of threads about this but hadn't managed to get anything to work. Anyway, after a long day today I finally came up with a solution. However, It is fairly long winded and as I add more sections it will require further work.
If you look at the working menu here: http://www.the-red-box.co.uk/plumbits
you can see what I'm trying to achieve in the menu. The way I've done it so far is to create a variable 'SectionNumber' (thanks to CDicken for this bit) and then in my main page layout use 4 different list layouts, each with a BLOCK around it, for the 4 different menu states. Then depending on the SectionNumber you are on it will display the appropriate menu. However, if I've got 4 parent sections I need 4 different Layouts. Here's the problem... If I've got 50 parent sections, as I have on another site for which I want to use the menu, I've got a lot of layouts and BLOCKS to do.
I have got a solution in head but I can't make it work. I'm looking for someone to help please. I think if I can put the following variable qualifier into a BLOCK:
<actinic:variable name="MainSection::SectionNumber" />
It will work. However when I try, I get a message saying that this is an 'invalid expression'. Here's my planned code:
I'm not entirely sure how clear I've been but if you need anymore info just let me know.
Many thanks in advance, Rob.
This is my first ever post on the forum. I've been using Actinic for about 4 months and have found the forum invaluable so far - thanks to everyone involved!
My current issue involves trying to get a static menu to display the child sections of the current section. For example, if I'm in section 2 - the menu will look like this:
Section 1
Section 2
Sub-Section 2a
Sub-Section 2b
Sub-Section 2c
Section 3
Section 4
I've read loads of threads about this but hadn't managed to get anything to work. Anyway, after a long day today I finally came up with a solution. However, It is fairly long winded and as I add more sections it will require further work.
If you look at the working menu here: http://www.the-red-box.co.uk/plumbits
you can see what I'm trying to achieve in the menu. The way I've done it so far is to create a variable 'SectionNumber' (thanks to CDicken for this bit) and then in my main page layout use 4 different list layouts, each with a BLOCK around it, for the 4 different menu states. Then depending on the SectionNumber you are on it will display the appropriate menu. However, if I've got 4 parent sections I need 4 different Layouts. Here's the problem... If I've got 50 parent sections, as I have on another site for which I want to use the menu, I've got a lot of layouts and BLOCKS to do.
I have got a solution in head but I can't make it work. I'm looking for someone to help please. I think if I can put the following variable qualifier into a BLOCK:
<actinic:variable name="MainSection::SectionNumber" />
It will work. However when I try, I get a message saying that this is an 'invalid expression'. Here's my planned code:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" > <a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" class="product_section"> <Actinic:Variable Name="SectionName"/> </a> </actinic:block> </br> <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 type="ChildSectionList" > <a href="<actinic:variable Name="SectionPageName"/>"> <actinic:variable Name="SectionName"/> </a> <br /> </actinic:block> </actinic:block>
Many thanks in advance, Rob.
Comment