Drop down menu in eZ Publish-4.01 - SOLVED

Drop down menu in eZ Publish-4.01 - SOLVED

Tuesday 04 November 2008 2:41:06 am - 3 replies

Modified on Thursday 20 November 2008 2:49:31 am by Sejal Paliwal

Author Message

Andreas Kaiser

Tuesday 04 November 2008 4:59:13 am

Hi,

To clear it, what classes are "books, shoes, clothings"? Are these objects/nodes under a specific node?

Could you post the code you are using... This would be the best to try to help you...

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Sejal Paliwal

Tuesday 04 November 2008 11:18:17 pm

Thanks .

To be more appropriate, I have a Product class- books.
Now I want to add different stores from where the books can be made available, I want to list these stores in a drop down menu, wherein all the items listed in the menu are links.

More specifically, I want to add the "Also Available from" functionality that is similar to the one on http://www.packtpub.com/joomla-version-1-5/book.

I tried adding the Selection attribute to the product class, but am not able to implement the dropdown functionality on the page.

Then, I added the following code in .../full/product.tpl-

<h3>Also Available From</h3> 
<form method="post" action= " " >
<select name="url">
<option value="http://www.alfresco.com">alfresco</option>
<option value="http://www.lob.de/">lehmans</option>
<option value="http://www.bookware.com.au/cgi-bin/bookware">bookware</option>
</select>
<input type="submit" value="Go!" />
</form>

The above code got me the dropdown menu, but without the redirecting links.
How to activate the links?

Kindly help me with the code to implement it.

Thanks in advance!

Sejal Paliwal

Thursday 13 November 2008 2:14:57 am

Solved by adding following code.

<script language="javascript" type="text/javascript">
<!--
function menu_goto( menuform )
{

    var baseurl = "http://mydomain.com" ;
    selecteditem = menuform.newurl.selectedIndex ;
    newurl = menuform.newurl.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      location.href = baseurl + newurl ;
    }
}
//-->
</script>

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.