Re: Need 2 Menus and other Nav question

76 views
Skip to first unread message

Fishsmith

unread,
May 22, 2013, 10:58:41 AM5/22/13
to dot...@googlegroups.com

Hi VSJ,

To answer you first question: This is uses Bootstrap's drop down menu and I'm not sure why, but this is the default behavior for Bootstrap drop down menu. However, you can use any JS or plain HTML menu you would. To change or edit this go to the following file in the dotCSM browser tree:
/application/themes/quest/header.vtl

This file has the code that generates the menu. To learn more about using the menu tool in dotCMS see this section in the doc site:
http://dotcms.com/docs/latest/NavigationTool

Your Service Menu would be created the same way.

Thanks,
Jason



On Wednesday, May 22, 2013 10:08:52 AM UTC-4, VSJ wrote:
Hi all, I'm new to dotcms and am slogging my way through, slowly but surely. I have a couple of questions...  BTW, I'm currently playing around in 2.3 with the Quest Theme.

1) I have menu items such as About, Services, Contact.  Under each of these are sub-pages.  Right now, The sub pages show up as dropdowns which is fine.  However I can't just click on the About link on the main navigation and have it take me to an about page.  I have to click on one of the sub-pages.  I don't want to have to list About as a subpage as well in order to get people to the actual about page.  How can I make the link clickable in the main navigation?

2) I basically need to have 2 menus, as seen in the attached screenshot, the top menu (About WSLH, WSLH SERVICES, etc) and the Services Menu (Clinical Services, Water & Other Environmental Testing, etc).  How would I go about doing that?

Thanks in advance for any help.  

P.S. Sorry for the offensive design on my screenshot, I've also been hired to completely redesign it!


VSJ

unread,
May 22, 2013, 2:37:33 PM5/22/13
to dot...@googlegroups.com
Thanks, I think that will help quite a bit!

VSJ

On Wednesday, May 22, 2013 9:08:52 AM UTC-5, VSJ wrote:
Hi all, I'm new to dotcms and am slogging my way through, slowly but surely. I have a couple of questions...  BTW, I'm currently playing around in 2.3 with the Quest Theme.

1) I have menu items such as About, Services, Contact.  Under each of these are sub-pages.  Right now, The sub pages show up as dropdowns which is fine.  However I can't just click on the About link on the main navigation and have it take me to an about page.  I have to click on one of the sub-pages.  I don't want to have to list About as a subpage as well in order to get people to the actual about page.  How can I make the link clickable in the main navigation?

2) I basically need to have 2 menus, as seen in the attached screenshot, the top menu (About WSLH, WSLH SERVICES, etc) and the Services Menu (Clinical Services, Water & Other Environmental Testing, etc).  How would I go about doing that?

Thanks in advance for any help.  

P.S. Sorry for the offensive design on my screenshot, I've also been hired to completely redesign it!

VSJ

Vanessa Jambois

unread,
May 29, 2013, 10:33:08 AM5/29/13
to dot...@googlegroups.com
So I am now just getting around to working this nav stuff out.  I am not sure how to implement the two different menus.  I took a look at the navigation documentation.  So anyway, I am a loss for how to assign certain items to one menu vs the other.  Any help is appreciated.  Thanks!

Fishsmith

unread,
May 29, 2013, 10:54:23 AM5/29/13
to dot...@googlegroups.com
The menus are based on the folder levels relative to the root of your host.

So the code you had for the top nav is pulling two levels deep from  "/" the root of your host.

So below is an example of the what the depths might look like in a typical website:

- About Us ( Folder on root - Level 1)
--- Contact Us (Folder inside About Us Folder - Level 2)
------ Miami Office (Page inside Contact Us folder Level 3)

You can use the menu macro (https://dotcms.com/docs/latest/NavigationMacro - Deprecated) or the New menu Tool (https://dotcms.com/docs/latest/NavigationTool) to create your menus, but both are based on folder and page levels relative to the root of your host.

Thanks,
Jason

Vanessa Jambois

unread,
May 29, 2013, 11:25:41 AM5/29/13
to dot...@googlegroups.com
OK, I think I got it. So I can make a folder and the navigation will the be "/folder/" instead of the root.  I like it, nice and easy.  Now final (for now) question.  Is it possible to add menu items based on a tag?  Like if I have a top menu and have content managers tag pages that should go into the top navigation?  I have a very strange navigation structure and I'm trying to figure out the best way to program it.  On the home page, there will be a top navigation with things like About Us, Contact, etc. then another navigation bar that will have the main areas of the page like Services, Testing, etc.  Then when the user goes into one of the main area pages, they will still see the top nav with the About Us, etc, the main area navigation will disappear but now they will see a left hand navigation.  Not the greatest I know.

Thanks,
Vanessa

Fishsmith

unread,
May 29, 2013, 11:53:17 AM5/29/13
to dot...@googlegroups.com
I'm not 100% sure I understand what you're trying to do, but here are a few options you could try.

1 - You could use a menu link that would link to a page that pulls content based on tags. (https://dotcms.com/docs/latest/AddingAMenuLink)

2 - Pull a list of Categories to create the menu. Then pass that category to a page that uses it to pull the content for that page (https://dotcms.com/docs/latest/Categories)

3 - Use JS to create the Mian Subnav based on the content of the page
----- jQuery TOC Plugin (http://effinroot.eiremedia.netdna-cdn.com/repo/plugins/misc/toc/index.html)
----- Example of a page that uses it to create a menu based on H1 tags (http://dotcms.com/themes/preview/muted-blue.dot)

Thanks,
Jason

Mark Pitely

unread,
May 29, 2013, 11:55:18 AM5/29/13
to dot...@googlegroups.com
Vanessa,

Here's a trick that might prove useful.
You can use the SQL tool to query the folder structure. You can either manipulate the query  (show_on_menu="f") or the resultant data to get a pretty good menu - at least if all you are interested in is the folders.
Like this:
#set ($query="SELECT * FROM  folder where show_on_menu='t' and host_inode='${host.identifier}' ORDER BY sort_order;")
#getSQLResults($query)
#foreach ($folder in $results)
$folder
<hr>
#end

I have some more complicated means of getting at the navigation stuff if you need it, as well.


Mark Pitely
Marywood University



Maria Ahues Bouza

unread,
May 29, 2013, 4:34:33 PM5/29/13
to dot...@googlegroups.com
Vannesa,

You could have another folder for your second navigation. Just pull one from the root and the second navigation from another folder you can call site-nav for instance. On the site-nav folder you can have either pages or menu links with velocity code to pull some content if needed.

-Maria


--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotcms?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Community Manager

dotCMS
Main: 305.900.2001
Fax: 305.397.2579
www.dotcms.com
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.
Reply all
Reply to author
Forward
0 new messages