Jahia in English > How to add a drop-down...

0 (0 Good)
0 (0 Bad)

How to add a drop-down menu?

by  benjaminjenni »  2013/10/14 09:38

Hello,

My question is pretty simple: How can I add a drop-down menu to the main navigation?

I've been searching in documentations, the internet and the forum but I can't  find an answer which is really useful to me.

Do I have to add a new module in the studio? If yes, which one? 

Best regards and thanks for your answer,

Ben

P.S.: I know that someone already asked nearly the same question but that was two years ago and I didn't understand the answer, so I thought I better make a new post. ;)

  • How to add a drop-down menu?
    2013/10/14 09:38

    benjaminjenni <p> Hello,</p> <p> My question is pretty simple: How can I add a drop-down menu to the main navigation?</p> <p> I&#39;ve been searching in documentations, the internet and the forum but I can&#39;t &nbsp;find an answer which is really useful to me.</p> <p> Do I have to add a new module in the studio? If yes, which one?&nbsp;</p> <p> Best regards and thanks for your answer,</p> <p> Ben</p> <p> P.S.: I know that someone already asked nearly the same question but that was two years ago and I didn&#39;t understand the answer, so I thought I better make a new post. ;)</p>

  • Number of messages  13
    Registration date Oct 14, 2013
    1 (1 Good)
    0 (0 Bad)

    Re: How to add a drop-down menu?

    by  theklem »  2013/10/14 10:18

    Hi,

    I guess your menu should appear on all pages of your site, then

    - In the Studio, the menu component must be inserted in your base template (hence, all templates will inherit of this menu)

    By default the rendering of this menu is processed by the files \tomcat\webapps\ROOT\modules\default\jnt_navMenu\html\navMenu.groovy which includes drop down menus if I'm not wrong and, of course, if you have several depth of pages in your website. 

    If you need to change/reformat this menu (logic or design) you can just create your own rendering view in your template-set

    - In your template set create the folder(s) jnt_navMenu/html/

    - Dupliacte the navMenu.groovy in your-template-set/jnt_navMenu/html

    Edit the file and change the code as necessary (note that you can create navMenu.jsp if you prefer to use jsp, etc) 

    For sure, the css classes defined in this file should match the ones used in your css

    This view placed in the template-set will have priority on the default view when Jahia will 

     

     

  • Re: How to add a drop-down menu?
    2013/10/15 08:10

    theklem <p> Hi,</p> <p> I guess your menu should appear on all pages of your site, then</p> <p> - In the Studio, the menu component must be inserted in your base template (hence, all templates will inherit of this menu)</p> <p> By default the rendering of this menu is processed by the files <strong>\tomcat\webapps\ROOT\modules\default\jnt_navMenu\html\navMenu.groovy</strong> which includes drop down menus if I&#39;m not wrong and, of course, if you have several depth of pages in your website.&nbsp;</p> <p> If you need to change/reformat this menu (logic or design) you can just create your own rendering view in your template-set</p> <p> - In your template set create the folder(s)&nbsp;<strong>jnt_navMenu/html/</strong></p> <p> - Dupliacte the&nbsp;<strong>navMenu.groovy</strong> in <strong>your-template-set/jnt_navMenu/html</strong></p> <p> Edit the file and change the code as necessary (note that you can create navMenu.jsp if you prefer to use jsp, etc)&nbsp;</p> <p> For sure, the css classes defined in this file should match the ones used in your css</p> <p> This view placed in the template-set will have priority on the default view when Jahia will&nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p>

  • Number of messages  85
    Registration date Oct 14, 2013
    1 (1 Good)
    0 (0 Bad)

    Re: How to add a drop-down menu?

    by  dgriffon »  2013/10/14 12:30

    Hello,
     
    Our default menu component already handle submenu (drop down) rendering.
     
    We have an expample of a dropdown menu in our ACME Space demo.
     
    After dropping a menu component in your template, you have to configure the start level and the depth of your menu
     
    Then use the menu we provide, we render an <ul><li> menu style.
     
    Change the css or the views if needed as Clement explained just before.
     
    best regards
     
    David 

    David Griffon (dgriffon)

    Number of messages  76
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: How to add a drop-down menu?

    by  benjaminjenni »  2013/10/15 08:14

    First of all: Thanks for your help!

    I found the navMenu.groovy and I tried to make a new folder in my template set in the studio but I didn't get where I can do this. I found out how I can create new "template sets", new "page templates" and new "content templates" but not how I can build a new folder. Can you help me with this? 

    And how should I duplicate the navMenu.groovy?  Should I make a new "page template" (in the "html" folder which I'll create) and "copy- paste" the content of the file (navMenu.groovy)?

    I found nothing that really helped me in the documentation...

    Best regards.

  • Re: Re: How to add a drop-down menu?
    2013/10/15 08:14

    benjaminjenni <p> First of all: Thanks for your help!</p> <p> I found the navMenu.groovy and I tried to make a new folder in my template set in the studio but I didn&#39;t get where I can do this. I found out how I can create new &quot;template sets&quot;, new &quot;page templates&quot; and new &quot;content templates&quot; but not how I can build a new folder. Can you help me with this?&nbsp;</p> <p> And how should I duplicate the navMenu.groovy? &nbsp;Should I make a new &quot;page template&quot; (in the &quot;html&quot; folder which I&#39;ll create) and &quot;copy- paste&quot; the content of the file (navMenu.groovy)?</p> <p> I found nothing that really helped me in the documentation...</p> <p> Best regards.</p>

  • Number of messages  13
    Registration date Oct 15, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: How to add a drop-down menu?

    by  faissah »  2013/10/18 16:29

    Hello,

    You would have to make those changes in your IDE and then deploy your custom module on your Jahia instance. Module development is currently not possible in the Jahia 6.6 Studio.

    Regards,

    Fabrice

    Fabrice  (faissah)

    Number of messages  264
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: How to add a drop-down menu?

    by  benjy »  2013/10/24 06:19

    When will be available in Jahia 6.6?

  • Re: Re: Re: Re: How to add a drop-down menu?
    2013/10/24 06:19

    benjy <p> When will be available in Jahia 6.6?</p>

  • Number of messages  1
    Registration date Oct 24, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Re: How to add a drop-down menu?

    by  shuber »  2013/10/24 07:01

    When will be available in Jahia 6.6?


    It is not planned for Jahia 6.6 but in the next major version of Jahia we are currently working on.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page