Drop down menu

Permalink
Goodd day - newbie
I would like to add a drop down menu, please point me in the right direction.
Thank you
JV

 
Mnkras replied on at Permalink Reply
Mnkras
you could always buy the superfish block in the marketplace

or you can try to make one using this tut by Remo

http://www.codeblog.ch/2009/04/concrete5-drop-down-menu/...
jvdev replied on at Permalink Reply
good day
I have tryed this one and get the following error - i am using version 5.3.3.1
I get code in the nav?

[generateNav(); global $c; if ($c->isEditMode()) { echo("
"); } else { echo("
"); } $nh = Loader::helper('navigation'); foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) { $thisLevel = $ni->getLevel(); if ($thisLevel > $lastLevel) { echo("\n\n
\n"); } else if ($thisLevel < $lastLevel) { for ($j = $thisLevel; $j < $lastLevel; $j++) { echo("\n
\n\n"); } } if ($thisLevel == $lastLevel && $i >0) { echo "\n"; } $pageLink = false; if ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) { $subPage = $_c->getFirstChild(); if ($subPage instanceof Page) { $pageLink = $nh->getLinkToCollection($subPage); } } if (!$pageLink) { $pageLink = $ni->getURL(); } echo '
' . $ni->getName(); $lastLevel = $thisLevel; $i++; } } $thisLevel = 0; for ($i = $thisLevel; $i <= $lastLevel; $i++) { echo("
"); } echo '
'; ?> }
Mnkras replied on at Permalink Reply
Mnkras
is that an error... that just looks like the script
jvdev replied on at Permalink Reply
Good day
Yes that is what I get....
I set the nav to display all and the custome template to Drop down menu..then I get that?
Mnkras replied on at Permalink Reply
Mnkras
did you not put it in <?php ?> tags?
jvdev replied on at Permalink Reply 1 Attachment
Good day
I did not write any code, I got 2 files that I added to \blocks\autonav\templates\drop_down_menu

Here are the two files?
I did check the view.php, it does have tags

Thank you
jvdev replied on at Permalink Reply
Good day
Thanks to all - I got it working
Thank you
Pritam replied on at Permalink Reply
Hi jvdev,

Would you mind sharing on how you fixed this , I am still stuck up trying to resolve this.
I've been getting this same error when applying drop-down menu template to the auto nav.
jvdev replied on at Permalink Reply
Drop down menu
I am a newbie to php and cms I hope this helps – but this is what I did
Add the following to \blocks\autonav\templates\drop_down_menu
dropdown_nav.php
view.php
view.php

In your theme add the following \themes\featuring
superfish.css
superfish-navbar.css
superfish-vertical.css

Make sure that you have the following in \themes\featuring\lib
hoverIntent.js
jquery-1.2.6.min.js
jquery.bgiframe.min.js
superfish.js
supersubs.js

And also check if you have the images in the following folder
\themes\featuring\images

Add the following in \themes\featuring\elements
footer.php
header.php

Now we have to add some code;
This is done in \themes\featuring\elements\header.php
In the section [<!-- Site Header Content //--> ]

Add the following 2 lines make sure this is above the line [<?php Loader::element('header_required'); ?>]
Lines to add
[<style type="text/css">@import "<?php echo $this->getStyleSheet('superfish.css')?>";</style>
<style type="text/css">@import "<?php echo $this->getStyleSheet('superfish-vertical.css')?>";</style>]

Now add the following under the line[[<?php Loader::element('header_required'); ?>]

[!--Superfish JS //-->
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/lib/hoverIntent.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/lib/superfish.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/lib/supersubs.js"></script>


<script type="text/javascript">

// initialise plugins
jQuery(function(){
$("ul.sf-menu").supersubs({
minWidth: 12, // minimum width of sub-menus in em units
maxWidth: 27, // maximum width of sub-menus in em units
extraWidth: 1 // extra width can ensure lines don't sometimes turn over
// due to slight rounding differences and font-family
}).superfish(); // call supersubs first, then superfish, so that subs are
// not display:none when measuring. Call before initialising
// containing tabs for same reason.
} );
</script>]

I hope this helps
Thank you
JV