Creating Tabbed Views in Drupal 6
As a Drupal newbie, I am always confused with its simple mechanisms, such as routing and menus. I just spent about an hour figuring out how to create a view with tabs that lead to more specific lists of data, for example, in 'document' page there are three tabs, one is 'all' which is the default display listing all contents, one is 'homework' leading to a path 'document/homework', and the last one is 'report' leading to 'document/report'.
'document' page
- tab 'all' -> 'document/all'
- tab 'homework' -> 'document/homework'
- tab 'report' -> 'document/report'
After 30 minutes of googling, I found this (and yelled 'Eureka'), Tutorial #3: Create two tabs to sort taxonomy view alphabetically and by created time. The method is quite simple but Drupal gave me no clues or I made a poor search (or I was so n00b that I didn't know these things before).
Well, the way is:
- Create a view.
- Name the path (url) to be what you want the default tab to be, for example, 'document/all'.
- Configure your view with sorting, filtering, etc.
- Choose 'Default menu tab' in Menu option and name it.
- Choose 'Normal menu item' to be the parent, since this tab is linked directly from a menu, i.e. 'document'
- Finish this first tab.
- Create another display.
- Name the path of this one as a tab option, like 'document/homework'.
- Configure it.
- Choose 'Menu tab' for this one.
- Finish this tab.
- Repeat (8) - (11) for more tabs.
That's it. Simple, huh?
Please leave a comment if there's any mistake above.



i sent the email to you laew
i sent the email to you laew naka
opithToop Bfpg Twerndarmaria
opithToop
Bfpg
Twerndarmaria
Bwbd
I was a little confused about
I was a little confused about Drupal too i just have a pair of weeks try in it, but seems a very good option for all this ways of customize it.
poker
Thanks for the tutorial link,
Thanks for the tutorial link, I was having a similar problem and that site has very good drupal tuts.
thanks.
Medical Job Australia
You can't know it all. No
You can't know it all. No matter how smart you are, no matter how comprehensive your education, no matter how wide ranging your experience, there is simply no way to acquire all the wisdom you need to make your business thrive.
Thank you very much for the
Thank you very much for the excellent and useful subject. Türkiyenin en iyi alışveriş sitesi. internette ucuz alışveriş yapabilme imkanı sağlar kadınlar için bayan giyim kategorisi altında yüzlerce ürün barındırır. Beyler için erkek giyim kategorisi içinde 100lerce giyim ürünü satılmaktadır. Ateşli geceler için fantazi giyim kategorisi altında cinsel hayatınızı daha sıcak ve daha sehvetli bir sekilde yasamaniz icin 100lerce ürün barındırmaktadır.! Evde beslemekte olduğumuz hayvalar için pet shop ürünlerini mağazamızdan temin edinebilirsiniz. Ucuz fiyatı ile cebinize dost outlet ürünlerimizle sizleri ucuz alışverişe davet ediyoruz. ha bide unutmadan iskenderun icinde lazim bogle bisi . en iyi haber sitesi budur. Otonuz için oto aksesuar burdan alınır.. Price of Raw Materials
Thanks a lot.
Thanks a lot.
Hi! I read your post and
Hi! I read your post and found it really interesting.
Hello, In number 7 you say:
Hello, In number 7 you say: Create another display.So is the same view for all the tabs?. It should't be diferent views for every tab.Thank you.
Hi great post, it helped me a
Hi great post, it helped me a lot. I have only one puzzle left.
How to use the same passed argument in all tabs?
My view displays information of a project. I want all tabs to only show information of that project. Normally it would be path/project/id and use an argument to select. In this case the tabs select the view and do not pass the (main) argument.
Any ideas ?
Sorry, found the answer
Sorry, found the answer it's:
set the path to document/%/title, document/%/description etc. and the main menu path to document/% and add args. save and goto path /document/101 for example. et voila.
Post new comment