Page 1 of 1

[Résolu] Problème avec le module bmenu

Posted: Mon Jan 14, 2008 12:41 pm
by okoweb
Bonjour et bonne année à la communauté !

J'ai installé avec succès le module bmenu. Après une configuration d'un menu exemple, je l'ai généré et voici le code à ajouter dans mon template {cms_module module="bMenu" styleid="43"}.

Dans mon template, dans le head j'ai mis

{cms_module module="bMenu"}

et dans le body à l'endroit d'affichage de mon menu :

{menu template='simple_navigation.tpl' collapse='1'}
{cms_module module="bMenu" styleid="43"}

Etrange sur le navigateur, je n'ai pas mon joli menu.

Quelqu'un pourrait m'aider?

Franche collaboration.

Re: Problème avec le module bmenu

Posted: Mon Jan 14, 2008 4:21 pm
by bterkuile
Did you associate the bMenu stylesheet with the (default) template?

ps, my French is not very good..

Re: Problème avec le module bmenu

Posted: Mon Jan 14, 2008 4:43 pm
by okoweb
bterkuile wrote: Did you associate the bMenu stylesheet with the (default) template?

ps, my French is not very good..
Bonsoir et merci !

Voici ma feuille de style par défaut et que j'ai lié au gabarit où mon menu doit s'afficher :

/*bMenu settings
menuOrientation:horizontal
submenu_horizontal:right
submenu_vertical:down
appearString:slideDown("normal")
disappearString:show("normal")
hideDelay:200
highlight_parents:1
stylesheet_selector:43
main_indicator:#primary-nav
sub_indicator:#primary-nav ul
class_default:
class_default_tag:a
class_active:.hover
class_active_tag:a
class_current:.currentpage
class_current_tag:a
class_haschildren:.menuparent
class_haschildren_tag:a
class_isparent:.activeparent
class_isparent_tag:a
defaultmain_border_size:1px
defaultmain_border_type:solid
defaultmain_border_color:#777
defaultmain_background_color:#000
defaultmain_background_image_url:
defaultmain_background_image_offset_x:left
defaultmain_background_image_offset_y:center
defaultmain_background_image_repeat:no-repeat
defaultmain_font_size:12px
defaultmain_font_color:#fff
defaultmain_font_family:
defaultmain_font_weight:normal
defaultmain_font_decoration:none
defaultmain_text_alignment:center
defaultmain_width:150px
defaultmain_height:25px
defaultmain_padding:3px
defaultmain_distance:-1px
defaultmain_submenu_distance:-1px
end bMenu settings*/
#primary-nav {
display:block;
margin:0;
padding:0;
list-style:none;
z-index:10001;
}

#primary-nav li{
float:left;
margin-right:-1px;
}

#primary-nav ul {
display:none;
position:absolute;
margin:0;
padding:0;
width:150px;
top:23px;
left:-1px;
}

#primary-nav ul li{
float:none;
margin-bottom:-1px;
}

#primary-nav ul ul{
top:-1px;
left:148px;
}

#primary-nav li{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav li a{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav li.hover{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav li.hover a.hover{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav li.currentpage{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav li.currentpage a.currentpage{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav li.activeparent{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav li.activeparent a.activeparent{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav li.menuparent{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav li.menuparent a.menuparent{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav ul li{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav ul li a{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav ul li.hover{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav ul li.hover a.hover{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav ul li.currentpage{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav ul li.currentpage a.currentpage{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav ul li.activeparent{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav ul li.activeparent a.activeparent{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}
#primary-nav ul li.menuparent{
display:block;
position:relative;
width:142px;
height:17px;
padding:3px;
border:1px solid #777;
background-color:#000;
background-position:left center;
background-repeat:no-repeat;
text-align:center;
}
#primary-nav ul li.menuparent a.menuparent{
background-color:inherit;
color:#fff;
font-weight:normal;
font-size:12px;
text-decoration:none;
font-family:;
}

Cordialement !

Re: Problème avec le module bmenu

Posted: Mon Jan 14, 2008 4:49 pm
by okoweb
bterkuile wrote: Did you associate the bMenu stylesheet with the (default) template?

ps, my French is not very good..
Rebonsoir bterkuile !

J'ai vu ce menu en marche sur votre site http://www.companytools.nl/, est-il possible d'avoir le source de votre gabarit sur ce site pour m'aider à comprendre son installation dans un gabarit?

Merci d'avance !

Franche collaboration !

Okoweb depuis le Cameroun

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 11:47 am
by bterkuile
The style code for the site www.companytools.nl is:

Code: Select all

/*bMenu settings
menuOrientation:horizontal
submenu_horizontal:right
submenu_vertical:down
appearString:show("normal")
disappearString:fadeOut("normal")
hideDelay:500
highlight_parents:1
stylesheet_selector:43
main_indicator:#primary-nav
sub_indicator:#primary-nav ul
class_default:
class_default_tag:a
class_active:.hover
class_active_tag:a
class_current:.currentpage
class_current_tag:a
class_haschildren:.menuparent
class_haschildren_tag:a
class_isparent:.activeparent
class_isparent_tag:a
defaultmain_border_size:1px
defaultmain_border_type:solid
defaultmain_border_color:#C0C0C0
defaultmain_background_color:#ECECEC
defaultmain_background_image_url:/images/cms/arrow-right.gif
defaultmain_background_image_offset_x:5px
defaultmain_background_image_offset_y:center
defaultmain_background_image_repeat:no-repeat
defaultmain_font_size:12px
defaultmain_font_color:#9d0105
defaultmain_font_family:
defaultmain_font_weight:normal
defaultmain_font_decoration:none
defaultmain_text_alignment:left
activemain_background_color:#9d0105
activemain_background_image_url:
activemain_background_image_offset_x:5px
activemain_background_image_offset_y:center
activemain_background_image_repeat:no-repeat
activemain_font_size:12px
activemain_font_color:#fff
activemain_font_family:
activemain_font_weight:bold
activemain_font_decoration:none
currentmain_background_color:#000
currentmain_background_image_url:/images/cms/arrow-right-active.gif
currentmain_background_image_offset_x:8px
currentmain_background_image_offset_y:center
currentmain_background_image_repeat:no-repeat
currentmain_font_size:12px
currentmain_font_color:#fff
currentmain_font_family:
currentmain_font_weight:bold
currentmain_font_decoration:none
isparentmain_background_image_url:/images/cms/arrow-down.gif
isparentmain_background_image_offset_x:5px
isparentmain_background_image_offset_y:center
isparentmain_background_image_repeat:no-repeat
defaultmain_width:150px
defaultmain_height:25px
defaultmain_padding:3px 3px 3px 20px
defaultmain_distance:2px
defaultmain_submenu_distance:5px
defaultsub_background_image_url:/images/cms/arrow.gif
defaultsub_background_image_offset_x:5px
defaultsub_background_image_offset_y:center
defaultsub_background_image_repeat:no-repeat
isparentsub_background_image_url:/images/cms/arrow-r.gif
isparentsub_background_image_offset_x:5px
isparentsub_background_image_offset_y:center
isparentsub_background_image_repeat:no-repeat
defaultsub_height:auto
defaultsub_distance:-1px
defaultsub_submenu_distance:-1px
end bMenu settings*/
Paste this in your stylesheet and then press "Generate menu" for these settings to create the actual stylesheet.

Thanks for the post of your style defenition, I tried it and realized that there is a bug in the bMenu module.
Don't use:

Code: Select all

Disappear: hide -> normal
This will not work.

Good luck!

To be sure, my simple_navigation.tpl looks like:

Code: Select all

{if $count > 0}
<ul id="primary-nav">
{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 class="currentpage"><a class="currentpage" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

{elseif $node->parent == true}
<li class="activeparent"><a class="activeparent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

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

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

{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 != ''} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

{/if}

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

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 3:37 pm
by okoweb
Bonjour !

Merci d'abord pour vos éléments de réponse. Maintenant le menu principal apparait mais les sous menu non. Et nos jolis effet slide et fade n'apparaissent. Rien que le main menu apparait avec sa mise en forme.

Est-ce c'est un problème de version de cmsmadesimple? J'utilise la version 1.2.2 et que j'ai rendu multilingue. Et mon bmenu est à la version 0.4.1.

En outre quel model de menu cmsms vous utilisez, cssmenu ou le menu simple? Moi j'utilise "simple_navigation.tpl".

Au secours !

Franche collaboration !

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 3:45 pm
by bterkuile
I think the problem here is in the {menu ..} call.
Try to change the

Code: Select all

{menu template='simple_navigation.tpl' collapse='1'}
to

Code: Select all

{menu template='simple_navigation.tpl'}

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 3:53 pm
by okoweb
Et voici mon gabarit





{* Change lang="en" to the language of your site *}



{sitename} - {title}
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}


{cms_module module="bMenu"}
{literal}

=b){nw=b+"px";}if(w



#pagewrapper {width:expression(P7_MinMaxW(720,950));}
#container {height: 1%;}


{/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Left sidebar + 1 column" *}








    {* start accessibility skip links *}
   
      {anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}
      {anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}
   
    {* end accessibility skip links *}


   
    {* Horizontal ruler that is hidden for visual browsers by CSS *}


  {* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet  "For template: Left menu + 1 column" *}
 


          {cms_selflink dir="start" text="$sitename"}
         
       

         
 
 
  {* End Header *}

           
{menu template='simple_navigation.tpl'}
{cms_module module="bMenu" styleid="46"}
           

  {* Start Search *}
 
          {lang}{search}
 
  {* End Search *}


  {* Start Breadcrumbs *}
 
        {breadcrumbs starttext='You are here' root='Home' delimiter='»'}
 
 
  {* End Breadcrumbs *}


  {* Start Content (Navigation and Content columns) *}
 

      {* Start Sidebar *}
     

      {* Start Navigation *}
     
        Navigation
     
      {* End Navigation *}


     
      {* End Sidebar *}


      {* Start Content Area *}
     
        {print showbutton=true script=true}
        {title}
        {content}


        {* Start relational links *}


{anchor anchor='main' text='^ Top'}

       
            {cms_selflink dir="previous" label="Previous page: "}

            {cms_selflink dir="next"}
       
        {* The label parameter doesn't need to be there if you're using English, but is here to show how it's used if you don't want the English text "Previous page" *}
{* End relational links *}

     
     
  {* End Content Area *}


 
  {* End Content *}

{* end pagewrapper *}

  {* Start Footer. Edit the footer in the Global Content Block called "footer" *}
 
      {global_content name='footer'}
     
   
  {* End Footer  *}


Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 4:24 pm
by bterkuile
Does this mean that is worked?

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 4:46 pm
by okoweb
Le menu affiche la liste mais non stylé et pas d'effet slide et fade.

Merci d'avance !

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 4:51 pm
by bterkuile
Then there still is something wrong I think.

If you give the address of your site I might see the problem.

Re: Problème avec le module bmenu

Posted: Tue Jan 15, 2008 5:28 pm
by okoweb
Rebonsoir !

J'ai mis une version en ligne pour voir http://www.mokolo.info/cfotso/chela/

Merci.

Re: Problème avec le module bmenu

Posted: Wed Jan 16, 2008 9:42 am
by okoweb
Bonjour bterkuile !

Nous avons constaté votre boulot ardu avec 2 nouvelles version de bmenu 0.4.5 et x.x.x que nous avons testé.

Et tous génèrent ce message d'erreur : bMenu error : There is no menu specified at "#primary-nav" après l'insertion complète :

- bMenu default stylesheet lié à mon template

- dans le head du template
  {cms_module module="bMenu"}

- et dans le body
  {menu template='simple_navigation.tpl'}
  {cms_module module="bMenu" styleid="51"}

Merci à vous

Franche collaboration!

Re: Problème avec le module bmenu

Posted: Wed Jan 16, 2008 11:18 am
by bterkuile
I implemented this error message because it indicates the most common bMenu problem. The error means that the bMenu module expects the menu to have the code like:

Code: Select all

<ul id="primary-nav">......</ul>
I checked the simple_navigation.tpl of cmsms 1.2.2 and there is no id given to the menu ul. There are two ways to solve this.
First:
Take my simple_navigation.tpl code from a previous post and put that in stead of your simple_navigation.tpl file

Second:
See if the menu structure of your website has something like:

Code: Select all

<div class="something">
<ul>
.....menu items...
</ul>
</div>
Then put ".something ul" in the Menu indicator field of bMenu (without the quotes)
Or:

Code: Select all

<div id="something">
<ul>
.....menu items...
</ul>
</div>
Then put "#something ul" in the Menu indicator field

I hope this solves the problem.

Re: [Résolu] Problème avec le module bmenu

Posted: Wed Jan 16, 2008 11:54 am
by okoweb
Bonjour !

Dear bterkuile Problem solved

Merci pour votre immence boulot.

Mais je te suggère de modifier ton module de tel sorte qu'il corresponde à l'instal de base de cmsms, sans utiliser ton simple_navigation.tpl.

Autre : à propos de la seconde methode, donner la procédure à suivre dans l'aide du module.

Franche collaboration !