Menu: clicking parent should only expand menu, not open page
Re: Menu: clicking parent should only expand menu, not open page
I
- placed the code in the templates "home" and "standard"
- made the menu template "treeview"
- uploaded "jquery.treeview.min.js"and the folder "images" to "uploads/treeview"
- changed the "images/" path in "jquery.treeview.min.css" to "uploads/treeview" and applied this stylefile "treeview" to the templates "home" and "standard"
It seems to work with these remarks
- the homepage menu has a different styling, something is wrong there
- the active, collapsed menu shows an empty child on top
What is causing the styling is still unclear to me, is the cursive styling standard styling for second level list items that I should overrule?
- placed the code in the templates "home" and "standard"
- made the menu template "treeview"
- uploaded "jquery.treeview.min.js"and the folder "images" to "uploads/treeview"
- changed the "images/" path in "jquery.treeview.min.css" to "uploads/treeview" and applied this stylefile "treeview" to the templates "home" and "standard"
It seems to work with these remarks
- the homepage menu has a different styling, something is wrong there
- the active, collapsed menu shows an empty child on top
What is causing the styling is still unclear to me, is the cursive styling standard styling for second level list items that I should overrule?
Last edited by mvandek2 on Sun Jul 04, 2010 10:33 am, edited 1 time in total.
Re: Menu: clicking parent should only expand menu, not open page
The problem on the start page is with:
The js code says:
But if you have it defined 2x how should $("#navigation").treeview know to which to asign.
You could change in the MenuManager to and change $("#navigation").treeview to $("#mymenu").treeview
This should solve your start page problem.
Run you site threw validator http://validator.w3.org/check?verbose=1 ... %2Fprofiel
This can save you lots of trouble.
Code: Select all
<div id="navigation">
Code: Select all
<div id="menu"><ul id="navigation">
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function(){
$("#navigation").treeview({
collapsed: true,
unique: true,
persist: "location"
});
});
</__script>
You could change in the MenuManager to and change $("#navigation").treeview to $("#mymenu").treeview
This should solve your start page problem.
Run you site threw validator http://validator.w3.org/check?verbose=1 ... %2Fprofiel
This can save you lots of trouble.
Re: Menu: clicking parent should only expand menu, not open page
It's the same for the other pages and there the menu behaves as it should.
I renamed the existing "navigation" in "nav", also no difference.
I also cannot identify what causes the empty top-child in the active menu.
So as soon as you click a child in a menu an empty child is addes at the top of the menu.
I renamed the existing "navigation" in "nav", also no difference.
I also cannot identify what causes the empty top-child in the active menu.
So as soon as you click a child in a menu an empty child is addes at the top of the menu.
Re: Menu: clicking parent should only expand menu, not open page
Try this menu template
Code: Select all
{if $count > 0}
<ul class="navigation">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}</li>
{elseif $node->index > 0}</li>{/if}{if $node->current == true}
<li><a href="{$node->url}" class="current"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>{elseif $node->parent == true && $node->depth == 1}
<li> <a href="{$node->url}" class="current"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>{elseif $node->type == 'sectionheader'}
<li>{$node->menutext}{elseif $node->type == 'separator'}<li>{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>{/if}{/foreach}{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Re: Menu: clicking parent should only expand menu, not open page
OK, now they are the same on home and other pages, also no empty top child entry anymore.
Thanks, I am almost there!
It does not expand/collapse anymore and I need to style it, I applied jquery.treeview.css but it does not do anything.
Thanks, I am almost there!
It does not expand/collapse anymore and I need to style it, I applied jquery.treeview.css but it does not do anything.
Last edited by mvandek2 on Sun Jul 04, 2010 11:29 pm, edited 1 time in total.
Re: Menu: clicking parent should only expand menu, not open page
Change Class="Navigation" to id="Navigation" in the Menu template
Re: Menu: clicking parent should only expand menu, not open page
Sorry, should have seen this one.
But the Home page (so Home template) does not respond to the style file.
But the Home page (so Home template) does not respond to the style file.
Re: Menu: clicking parent should only expand menu, not open page
do you use different page templates?
Try cleaning up the errors in your markup.
http://validator.w3.org/check?verbose=1 ... -pa.com%2F
Try cleaning up the errors in your markup.
http://validator.w3.org/check?verbose=1 ... -pa.com%2F
Re: Menu: clicking parent should only expand menu, not open page
Yes, I have a differente template for the homepage, calls for the youtube and image gallery is only on the homepage.
The image gallery is the problem, when I remove {gallery} it seems to work.
I cannot target the problem in this module.
The menu is also pretty jumpy when opening pages, probably css issue?
The image gallery is the problem, when I remove {gallery} it seems to work.
I cannot target the problem in this module.
The menu is also pretty jumpy when opening pages, probably css issue?
Re: Menu: clicking parent should only expand menu, not open page
Ok good you found the Problem, you removed Gallery from the start page so i can't take a look at it anymore.
The problem could either be somewhere same CSS id or class, or js for menu and gallery interfering each other.
The problem could either be somewhere same CSS id or class, or js for menu and gallery interfering each other.
Re: Menu: clicking parent should only expand menu, not open page
which Gallery template did you use? probably one that calls the jQuery library also... Things can go wrong when jQuery gets called twice.
You could try to delete the jQuery call from the Gallery template and see what happens...
You could try to delete the jQuery call from the Gallery template and see what happens...
Re: Menu: clicking parent should only expand menu, not open page
Jos, you are right, thanks for that.
I think it is the default gallery "Gallery-1.3.2.xml" with "Fancybox" as the popup.
I replaced the Gallery and it seems OK.
Is the jumpiness of the menu a CSS matter?
I think it is the default gallery "Gallery-1.3.2.xml" with "Fancybox" as the popup.
I replaced the Gallery and it seems OK.
Is the jumpiness of the menu a CSS matter?
Re: Menu: clicking parent should only expand menu, not open page
For sure yes... probably has to do with positioning and dependancy of rendering the page by the browser. Not something i can help you with...