Two Part Menu

Search engine friendly UL list type menu for Actinic V8 and V9. Styled by CSS and animated by a small JavaScript.
Post Reply
CorasIT
Posts: 2
Joined: Thu Nov 26, 2009 2:01 pm

Two Part Menu

Post by CorasIT »

I am working on a shop for a client. They want to set up the top level sections so that some sections are exclusively devoted to one brand. Other sections are more logical categories but will contain product duplicates from the 'brand sections'

Is there any easy way I can split NorList with two sub-heading are shown in the (before and after) graphics - The second one was done in photoshop so it it clear what I wanted to achive. There is a post on the main actinic site which explains about giving each top level section a unique 'SectionNumber' -
http://community.actinic.com/showthread.php?t=36913. This variable might be used to determine where the headings/splits go.
Attachments
The present menu
The present menu
now.jpg (49.32 KiB) Viewed 11036 times
What I want to achive
What I want to achive
Desired.jpg (54.63 KiB) Viewed 11037 times
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: Two Part Menu

Post by norman »

It should be possible to tweak NorList to do this.

Look in layout NorList Dynamic Menu Code for a long line (about line 53) starting:

Code: Select all

<li><a href=
Amend the <li> bit to be something like (using Demo site and adding a heading above Books):

Code: Select all

<li<actinic:block if="%3cActinic%3aVariable%20Name%3d%22SectionName%22%3e%20%3d%3d%20%27Books%27" > style="color:white; background:red">BOOKS HERE</li><li</actinic:block>>
I've used inline style for ease of testing but you'd probably want to use a class instead.

You'll also want two blockif's (one after the other) to deal with your two requirements so lets do Homeware in green:

Code: Select all

<li<actinic:block if="%3cActinic%3aVariable%20Name%3d%22SectionName%22%3e%20%3d%3d%20%27Books%27" > style="color:white; background:red">BOOKS HERE</li><li</actinic:block><actinic:block if="%3cActinic%3aVariable%20Name%3d%22SectionName%22%3e%20%3d%3d%20%27Homeware%27" > style="color:white; background:green">HOMEWARE HERE</li><li</actinic:block>>
I'm using the Section Name for the test in the blockif. Make sure that this Section name is unique (you wouldn't want a sub-section also called Books to mess things up). You could also use SectionID, SectionPageName, etc.
Norman
CorasIT
Posts: 2
Joined: Thu Nov 26, 2009 2:01 pm

Re: Two Part Menu

Post by CorasIT »

Norman,

Brilliant - that produced the required reult.
:D
Post Reply