Forums / Setup & design / Drop down menu in eZ Publish-4.01 - SOLVED

Drop down menu in eZ Publish-4.01 - SOLVED

Author Message

Sejal Paliwal

Tuesday 04 November 2008 2:41:06 am

I am a newbie to eZ Publish. I wanted to create a drop down menu which consist of a list with external links.
Details - I want to create a drop down menu with the heading - "Categories".
And the drop down consist of a list such as books, shoes, clothings etc. Now, on selecting any one from the dropdown, the user is redirected to the embedded link.

Kindly help.

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>

eZ debug

Timing: Jan 18 2025 18:16:19
Script start
Timing: Jan 18 2025 18:16:19
Module start 'content'
Timing: Jan 18 2025 18:16:19
Module end 'content'
Timing: Jan 18 2025 18:16:19
Script end

Main resources:

Total runtime0.1813 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.8438180.8125
Module start 'content' 0.00730.0117 768.656398.0547
Module end 'content' 0.01890.1621 866.7109526.2500
Script end 0.1811  1,392.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.9744200.0002
Check MTime0.00130.7434200.0001
Mysql Total
Database connection0.00110.603510.0011
Mysqli_queries0.127770.42591410.0009
Looping result0.00130.73601390.0000
Template Total0.161589.110.1615
Template load0.00100.561010.0010
Template processing0.160588.540710.1605
Override
Cache load0.00070.383910.0007
Sytem overhead
Fetch class attribute can translate value0.00100.556510.0010
XML
Image XML parsing0.00030.141210.0003
General
dbfile0.00362.0033200.0002
String conversion0.00000.003730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs