Can the top level section links be images

Search engine friendly UL list type menu for Actinic V8 and V9. Styled by CSS and animated by a small JavaScript.
Post Reply
leej
Posts: 46
Joined: Thu May 17, 2007 10:03 am
Location: Otley, Leeds
Contact:

Can the top level section links be images

Post by leej »

Hi Norman,

I am looking into whether it's possible to have image links for top level sections in stead of text links.

I have noticed that there is some commented out code within the style sheets for NorList and understand the concept of adding an id to every link and then applying it hoever with NorList being dynamic there is no way to applying an id to each section, or is there? Below is an example of how I'd like it to look

Image
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

This can be done but by adding an optional variable NorListImage to the Section details and amending the NorList code to include the image instead of the text if found.

To do this go to Design / Library / Variables / Section, right-click Section and select New Variable. Set it as below

Code: Select all

Name			NorListImage
Description		Optional Image for NorList menu entry.
Prompt			NorListImage
Group			Section
Place of Setting	Section
Tab Name		General
Allow <Use Parent...>	Unchecked
Type			Filename
Allow Empty Value	Checked
Searchable		Unchecked
Upload			Unchecked
Initial Value		<blank>
Top Level Value		<blank>
OK out

Go to Design / Library / Layouts / NorList Menu / NorList Dynamic Menu Code
Look for the very long line line (near the bottom)

Code: Select all

			</actinic:block><li><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>'><Actinic:Variable Name="SectionName"></a>
Replace the above with

Code: Select all

			</actinic:block><li><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>'>
			<actinic:block if="%3cactinic%3avariable%20name%3d%22NorListImage%22%20%2f%3e%20%21%3d%20%22%22" ><img border=0 src="<actinic:variable name="NorListImage" />" alt="</actinic:block><Actinic:Variable Name="SectionName"><actinic:block if="%3cactinic%3avariable%20name%3d%22NorListImage%22%20%2f%3e%20%21%3d%20%22%22">" /></actinic:block></a>
Now if you define a NorListImage for any Section it will be used instead of the Section Name. The Section Name will be used as an ALT tag for the image to keep search engines happy.
Norman
Post Reply