• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: zobrazenie menu [SOLVED]
PostPosted: Tue Sep 24, 2013 6:05 pm 
Offline
Forum Members
Forum Members

Joined: Tue Aug 28, 2012 7:49 am
Posts: 11
Dobrý deň, potrebujem pomoc so zobrazením menu. Popíšem situáciu.
Mám štruktúru stránok:
$1

potrebujem v šablóne zobraziť iba stránky týkajúce sa stránky "Produkty"

takže mám v šablone vložene {menu childrenof=$page_alias template="leftmenu" }

kod šablóny menu je
\$1:
{* 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 *}

{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
  {assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}

{if $count > 0}
<ul id="left_menu">
{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->parent == true or $node->current == true}
  {assign var='classes' value='menuactive'}
  {if $node->parent == true}
    {assign var='classes' value='menuactive menuparent'}
  {/if}
 {if $node->children_exist == true and $node->depth < $number_of_levels}
    {assign var='classes' value=$classes|cat:' parent'}
  {/if}
  <li class="{$classes}"><a class="{$classes}" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="parent"><a class="parent" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span></h3>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a href="{$node->url}"><span>{$node->menutext}</span></a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}


potrebujem aby to vyzeralo tak že keď otvorím stránku produkty v menu sami zobrazia prvy 1 urovne, ked kliknem na niektorý z nich otvorí sa stránka s jeho obsahom a v menu budu polozky Aktívna čo je zobrazena a jej pod urovne 1.2,1.3, aby sa zobrazoval teda iba strom konkretneho prvku,

vzor podla obrazka:
kliknem na prvok 2.1 - zobrazia sa mi prvky 2.1.1 a 2.1.2,
V niektorých sablonach cms ms to bolo robené tak ,ze sa kliklo na kokretny prvok a rozrolovala sa ponuka pod tým so subkategoriamy. Viete mi nejako pomôcť podrobným popisom čo kde mam napísať aby som to rozbehal ? ďakujem


Last edited by svajny on Tue Oct 08, 2013 8:39 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: zobrazenie menu
PostPosted: Sun Oct 06, 2013 11:39 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Oct 10, 2006 5:00 pm
Posts: 448
Location: Bratislava
Nevladzem teraz moc analyzovat tvoj dotaz, ale skryvat zobrazovat menu na podstrankach by mal zabezpecovat parameter collapse=1

{menu childrenof=$page_alias template="leftmenu" collapse=1}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting