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
I would like to add a drop down menu, please point me in the right direction.
Thank you
JV
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 '
'; ?> }
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 '
'; ?> }
is that an error... that just looks like the script
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?
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?
did you not put it in <?php ?> tags?
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
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
Good day
Thanks to all - I got it working
Thank you
Thanks to all - I got it working
Thank you
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.
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.
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
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
or you can try to make one using this tut by Remo
http://www.codeblog.ch/2009/04/concrete5-drop-down-menu/...