Accordion V2 - Omitting some Top-Level Sections

Two level, smoothly expanding, search engine friendly accordion menu.
Post Reply
Site Admin
Posts: 1248
Joined: Sat Feb 07, 2004 9:55 pm

Accordion V2 - Omitting some Top-Level Sections

Post by norman »

This post is for Accordion Menu V2.

It is possible to omit some Top Level Sections from display.

Go to Design / Library / Layouts / Accordion Menu / Glossy Accordion Menu.

Near the bottom is a very long line containing:

Code: Select all

<a sid="<actinic:variable name="SectionID" />".....
Put code to start a Condition immediately in front of the above code (leave anything before it in place) that displays everything except what you want hidden. E.g.

Code: Select all

<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionName%22%20%2f%3e%20%21%3d%20%22Books%22" ><a sid="<actinic:variable name="SectionID" />".....
Don't leave any white space or newlines between the new code and the <a sid="....... tag.

Then look for the very last </actinic:block> in the layout.
Put another </actinic:block> to end the Condition immediately after that so it reads </actinic:block></actinic:block>
Again don't introduce any white space or newlines.

The above Condition looks like: SectionName != "Books" i.e. display everything except books.

A tutorial on Conditions can be found in Actinic's Advanced Guide under "Hiding Things With Conditions".

You can even use PHP in the Condition. E.g.

Code: Select all

<actinic:block if="%21%20stristr%28%3cactinic%3avariable%20name%3d%22SectionName%22%20%2f%3e,%20%27mail%27%29">
Will hide any Sections with the word "mail" in their name (and ignoring case).

NOTE: Updated 13-04-12 to deal with Accordion V2.11 onwards.
Post Reply