Page 1 of 1

CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 5:11 am
by Rubio
Hello, forgive my poor English, but I used a translator.
I need to use a vertical menu created with Artisteer running through the CSS and javascript.
The CSS and javascript file existe.


My problem is that I do not know how to configure the "Menu Manager" in order to create the menu and automatically handles JavaScript.

The menu code to handle is the following:


Home


News

Top 10




Menu Item

Subitem 1
Subitem 2
Subitem 3




Video



Archive

2008

January
February
March


2007

January
February
March


2006

January
February
March






Contact

In a post I found a solution like this:
{if $count > 0}


{foreach  ...
... '}

{literal}

var Browser = navigator.appName; ...
... ->tabindex}{literal}">{/literal}{$node->menutext}{literal} {/ ...
... ->tabindex}{literal}">{/literal}{$node->menutext}{literal} {/ ...
... ->tabindex}{literal}">{/literal}{$node->menutext}{literal} {/ ...
... ->tabindex}{literal}">{/literal}{$node->menutext}{literal} {/ ...
...
>{$node->hierarchy}: {$node->menutext}
{/if}

{/foreach}

{repeat  ...
...  Bressers, adapted from original CMSMS menu template 'cssmenu.tpl' -->

{/if}
I note that I do not understand nothing of PHP, so if anyone can help me thank him. ;D ;D

Alfredo

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 11:02 am
by spcherub
Alfedo,

What you need is already built into the default templates in MenuManager. You simply make a copy of the simple menu template, fit it to include your custom classes and span tags. Eveything else including the hierarchy of lists is created by the loop within the template.

Your JavaScript and CSS should not be included at the top of the page template and should not be inline inside the menu template.

Does tha help?

Sanjay

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 3:39 pm
by Dr.CSS
I would have to see an example of the menu in action to give you an idea of how to get it to work in CMSMS...

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 3:57 pm
by Rubio
The example can be found here:

http://www.rubiofree.com/demo/

and 'the upper left corner.

I have the CSS file and the java that makes it work.

I miss the menu manager.
I tried with the sample, the simple menu, but the Span Tag and I can not configure.

The SimpleMenuManager is as follows:
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}

{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}


{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
url}">{$node->menutext}

{elseif $node->haschildren == true and $node->type != 'sectionheader' and $node->type != 'separator'}
url}">{$node->menutext}

{elseif $node->current == true}
{$node->menutext}

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
url}">{$node->menutext}

{/if}

{/foreach}
{repeat string="" times=$node->depth-1}

{/if}
You can update according to my Span Tag and recalled at the beginning of my post?

Okay then call the java in the template like this?








{sitename} - {title}

{metadata}

{stylesheet}

{literal}
 



  {/literal}




.................
Sorry again my bad English  :'(

Thanks in advance for the help
Alfredo

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 4:06 pm
by Dr.CSS
No JS needed and the CSS is already done, look to this menu...

http://multiintech.com/defaultcontent/i ... msms-works

This is the template used...

http://multiintech.com/defaultcontent/i ... ge=navleft

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 4:36 pm
by Rubio
You are right, but I have to build me a new CSS from scratch to match the colors and everything else.

In fact I've already tried, but I did not go very far  ??? ??? ??? . In fact I've lost many hours without getting great results.

I am attaching the file of my menu, maybe if you can look directly and make the appropriate changes there would be grateful. ;) ;) ;)

http://www.rubiofree.com/demo/Vertical_Menu.zip

Might be able to create the appropriate MenuManager and CSS

The fact that we insist on my part with a menu in java, it is because using Artisteer to create the template I can create it easily without changing the code too.

I do know something?

thanks
Alfredo

Re: CSS Menu maintained by javascript

Posted: Thu Oct 07, 2010 7:33 pm
by Dr.CSS
I don't do menus with JS unless it's some jQuery to make it drop slowly etc....