| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
dropdown speedbar | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi
I wanted to add a drop down menu to my speed bar. With Phil's help I was successful - here is a link http://www.i-fiberoptics.com/xcart/home.php#link (still in development but that part works) Now I'm trying to do it on another site ... but it's not working. I have this code in tabs.tpl <code> <ul id="flexmenu1" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} {if $p.show_in_menu eq 'Y' && $p.orderby gte "100" && $p.orderby lte "199" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> ... three more lists here <ul id="flexmenu4" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} {if $p.show_in_menu eq 'Y' && $p.orderby gte "400" && $p.orderby lte "499" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> {if $speed_bar} <div class="tabs{if $all_languages_cnt gt 1} with_languages{/if} monitor"> <ul> {foreach from=$speed_bar item=sb name=tabs} {strip} <li{interline name=tabs}> <a href="{$sb.link|amp}"{if $sb.title eq "Cemetery Memorials"} data-flexmenu="flexmenu1" {elseif $sb.title eq "Support"} data-flexmenu="flexmenu2" {elseif $sb.title eq "Purchase"} data-flexmenu="flexmenu3" {elseif $sb.title eq "About Us"} data-flexmenu="flexmenu4" {/if}> {$sb.title} <img src="{$ImagesDir}/spacer.gif" alt="" /></a> <div class="t-l"></div><div class="t-r"></div> </li> {/strip} {/foreach} </ul> </div> </code> I also copied over the flexmenu.css and flexmenu.js - they are in a folder in customer/dropmenu BUt it's not working on the new site http://www.watertownmemorialcompany.com/ I even went so far as to copy over the WHOLE skin and common_files from the IFO site and its's still not working. If I look at the CSS in firebug - the <ul> are there but they are before the link code. Do you think I need to add something somewhere else in the source to make this work ? I'm not sure what {interline} is doing. Phil - if you see this - do you remember changing anything else ? Thanks DonnaNJ |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Well the good news is that your CSS and JS appear to be loading correctly.
Thanks for actually providing reference links to look at! The current html output looks like: Code:
I use this particular trick all the time, pretty cool that Phil does too. I am pretty sure you are not getting the array set in PHP. Especially since you copied over the whole skin. All signs point to this. Check if it is set and get back to us. -Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
![]() There are there - I posted the last two -= I added another page.. i also notcied at the bottom before the </body>
there is this <ul id="flexmenu4" class="flexdropdownmenu jqflexmenu" style="visibility: visible; z-index: 1005; left: -435px; top: 35px; display: none;"> There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 There are files in flexmenu4 <li> <a href="http://www.watertownmemorialcompany.com/testimonials.html">Testimonials</a> </li> There are files in flexmenu4 <li> </ul> <ul id="flexmenu1 AND if I actually HOVEr on the about - some text I wrote in the loop shows up but the link - does not ... and I have the extra link ! hmmm .... any thing else I can look at ? thanks Donna 7 => Array (11) pageid => "11" filename => "page_003.html" title => "Testimonials" level => "E" orderby => "410" active => "Y" language => "en" show_in_menu => "Y" meta_description => "" meta_keywords => "" title_tag => "" 8 => Array (11) pageid => "12" filename => "page_016.html" title => "Page16" level => "E" orderby => "420" active => "Y" language => "en" show_in_menu => "Y" meta_description => "" meta_keywords => "" title_tag => "" |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Yes I see that now, those extra <ul> tags near the body.
is it possible that you can post the entire template file? Use code and /code tags surround with [] like[/code] Whatever is happening is pretty strange! I'm now guessing something is wrong with the template.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||
|
|||||||
![]() This is the tabs.tpl .... is that what you want ?
<code> {if $pages_menu} There is something in the pages menu <ul id="flexmenu1" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} {if $p.show_in_menu eq 'Y' && $p.orderby gte "100" && $p.orderby lte "199" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> <ul id="flexmenu2" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} {if $p.show_in_menu eq 'Y' && $p.orderby gte "200" && $p.orderby lte "299" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> <ul id="flexmenu3" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} {if $p.show_in_menu eq 'Y' && $p.orderby gte "300" && $p.orderby lte "399" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> <ul id="flexmenu4" class="flexdropdownmenu"> {foreach from=$pages_menu item=p name=page} There are files in flexmenu4 {if $p.show_in_menu eq 'Y' && $p.orderby gte "400" && $p.orderby lte "499" } <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a></li> {/if} {/foreach} </ul> <br/> {/if} {if $speed_bar} <div class="tabs{if $all_languages_cnt gt 1} with_languages{/if} monitor"> <ul> {foreach from=$speed_bar item=sb name=tabs} {strip} <li{interline name=tabs}> <a href="{$sb.link|amp}"{if $sb.title eq "Cemetery Memorials"} data-flexmenu="flexmenu1" {elseif $sb.title eq "Support"} data-flexmenu="flexmenu2" {elseif $sb.title eq "Purchase"} data-flexmenu="flexmenu3" {elseif $sb.title eq "About Us"} data-flexmenu="flexmenu4" {/if}> {$sb.title} <img src="{$ImagesDir}/spacer.gif" alt="" /></a> <div class="t-l"></div><div class="t-r"></div> </li> {/strip} {/foreach} </ul> </div> </code> |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Replace tabs.tpl (make a backup of course) with the following code:
Code:
All I have done is comment out the existng tabs menu for now, to get it out of our way. Then I moved you test words inside the if statements, so they will only show up if those conditions are met. I think what may be going on is that the static pages don;t actually exist, the way you had your test words placed would cause them to show as long as the $pages_menu existed, and loop for each item in $pages_menu. This should bring to the surface what is truly going on. You can see on my test site: http://trainingpen.com that the <ul> tags are showing up, but there are no <li> tags inside them, because the if statement conditions are not being met. Perhaps the associated javascript files are playing havoc with the output, since there are no <li>s. To troubleshoot this, I would remove the links to the CSS and JS temporarily, then edit the .tpl to only show one flexmenu. Ensure that the pages orderby is within the range you specify, then see what the html output is. Get the html output working correctly, then add your JS and CSS back in.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() P.S. did you get my PM?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#8
|
|||||||
|
|||||||
![]() Oh that made the nav go away altogether - so you are right something is missing
But it works on the other site - there must be another change that I am missing. We' ll post it here when we figure it out ! |
|||||||
#9
|
|||||||
|
|||||||
![]() Quote:
Hi Donna, maybe skin/common_files/customer/service_head.tpl Quote:
__________________
xcartmods.co.uk |
|||||||
|
#10
|
|||||||||
|
|||||||||
![]() OK! We got it figured out. The final working code:
Code:
A key part is that the speed bar menu is linked to the pages menu, based on the name of the speed bar item and the position value of the page.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|