Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu] Menu vertical qui ne réagit pas comme je le voudrais
#1

Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
#~ Version du CMS: 1.8.2
#~ Nom de l'hébergeur : Ovh
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.8.2
#~ Installed Modules:
#~ * FCKeditorX: 1.0 RC1
#~ * MenuManager: 1.6.5
#~ * News: 2.10.6
#~ * ThemeManager: 1.1.1
#~ * Search: 1.6.5
#~ * FileManager: 1.0.2
#~ * Printing: 1.1.0
#~ * nuSOAP: 1.0.2
#~ * ModuleManager: 1.4
#~ * CGExtensions: 1.20
#~ * CGFeedMaker: 1.0.11
#~ * TinyMCE: 2.7.3
#~ * CMSMailer: 2.0
#~ * CustomContent: 1.7.3
#~ * CGExtensions: 1.20
#~ * CMSMailer: 2.0
#~ * FrontEndUsers: 1.12.3
#~ Config Information:
#~ * php_memory_limit:
#~ * process_whole_template: false
#~ * output_compression: false
#~ * max_upload_size: 2000000
#~ * default_upload_permission: 664
#~ * url_rewriting: internal
#~ * page_extension:
#~ * query_var: page
#~ * use_hierarchy: true
#~ * image_manipulation_prog: GD
#~ * auto_alias_content: true
#~ * locale:
#~ * default_encoding: utf-8
#~ * admin_encoding: utf-8
#~ * set_names: false
#~ Php Information:
#~ * phpversion: 5.2.14
#~ * md5_function: On (Vrai)
#~ * gd_version: 2
#~ * tempnam_function: On (Vrai)
#~ * magic_quotes_runtime: Off (Faux)
#~ * E_STRICT: 0
#~ * memory_limit: 128M
#~ * max_execution_time: 30
#~ * output_buffering: On
#~ * safe_mode: Off (Faux)
#~ * file_uploads: On (Vrai)
#~ * post_max_size: 64M
#~ * upload_max_filesize: 64M
#~ * session_save_path: /tmp (1777)
#~ * session_use_cookies: On (Vrai)
#~ * xml_function: On (Vrai)
#~ Server Information:
#~ * Server Api: cgi
#~ * Server Db Type: MySQL (mysql)
#~ * Server Db Version: 5.0.90
#~ ----------------------------------------------
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~

Bonjour la team Smile

J'ai un souci sur lequel je coince et pour lequel j'aurais besoin de votre aide.

La question bien que semblant toute simple me pose problème ne maitrisant pas bien le fonctionnement des templates.

J'aimerais que dans le menu vertical de notre site les sous rubriques s'affichent uniquement lorsqu'on clique sur un sujet

Exemple :

Le menu de base serait :

- Voiture
- Camion
- Bateau

Lorsque je cliquerais sur Camion çà donnerait :

-Voiture
-Camion
-Gros
- > 5000 euros
- Entre 5000 euros et 10 000 euros
-Moyen
-Petit
- Bateau

Et ainsi de suite tant que çà n'affiche que ce qui est sélectionné et non toute l'arborescence complète (ce que j'ai pour l'instant)...

Voici une copie de mon simple_navigation.tpl pour info :

Citation :{* 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}
<ul>
{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 and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->haschildren == true 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}

Et ici le template appliqué aux puces pour l'affichage vertical du menu (<ul id = "subNav">)

Citation :{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page. Used both for the horizontal main menu and the top level in the vertical submenu.
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. Also used for the horizontal <ul> to use the entire width of the block element that it is wrapped in. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
<ul id="homeNav" class="clearfix">
{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 && $node->depth == 1}
<li class="active0{$node->depth}"><a href="">{$node->menutext}</a>
{elseif $node->current == true && $node->depth > 1}
<li class="active0{$node->depth-1}"><a href="">{$node->menutext}</a>
{elseif $node->parent == true && (($node->depth == 1) or ($node->depth == 2))}
<li class="activeparent"><a href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><a href="">{$node->menutext}</a>{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"><hr class="clearfix" />
{else}
<li><a href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{/if}
{/foreach}

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

Si quelqu'un pense pouvoir m'aider où m'orienter vers une solution qui réponde à mes attentes je serais preneur quitte à simplifier le gabarit si il le faut....

Bonne journée
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 2 visiteur(s)