tewson's thoughtstream

ห้วงหนึ่งของความเกรียน

Primary links

  • home
  • films
  • free software
  • about

Recent Posts

  • ชีวิตคือการเดินทาง
  • อารมณ์ขัน
  • SS
  • The Aftermath
  • แม้น/แม้

Tags in Tags

announcement bangkok film lecture life poetry politics tcdc tech thought travel university
more tags

Stay Tuned

Subscribe

Creating Tabbed Views in Drupal 6

Submitted by tewson on Sun, 18/01/2009 - 00:58
  • drupal
  • intellect

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:

  1. Create a view.
  2. Name the path (url) to be what you want the default tab to be, for example, 'document/all'.
  3. Configure your view with sorting, filtering, etc.
  4. Choose 'Default menu tab' in Menu option and name it.
  5. Choose 'Normal menu item' to be the parent, since this tab is linked directly from a menu, i.e. 'document'
  6. Finish this first tab.
  7. Create another display.
  8. Name the path of this one as a tab option, like 'document/homework'.
  9. Configure it.
  10. Choose 'Menu tab' for this one.
  11. Finish this tab.
  12. 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

Submitted by peach (not verified) on Mon, 19/01/2009 - 10:48.

i sent the email to you laew naka

  • reply

opithToop Bfpg Twerndarmaria

Submitted by metriebarty (not verified) on Fri, 07/08/2009 - 21:07.

opithToop
Bfpg
Twerndarmaria
Bwbd

  • reply

I was a little confused about

Submitted by Sean (not verified) on Sat, 19/09/2009 - 08:09.

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

  • reply

Thanks for the tutorial link,

Submitted by Medical Job Australia (not verified) on Mon, 21/09/2009 - 12:31.

Thanks for the tutorial link, I was having a similar problem and that site has very good drupal tuts.
thanks.
Medical Job Australia

  • reply

You can't know it all. No

Submitted by TeseOpTinny (not verified) on Sun, 04/10/2009 - 15:26.

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.

  • reply

Thank you very much for the

Submitted by Anonymous (not verified) on Tue, 22/12/2009 - 23:27.

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

  • reply

Thanks a lot.

Submitted by Shurik (not verified) on Tue, 02/03/2010 - 19:48.

Thanks a lot.

  • reply

Hi! I read your post and

Submitted by pharmacy viagra (not verified) on Wed, 10/03/2010 - 23:50.

Hi! I read your post and found it really interesting.

  • reply

Hello, In number 7 you say:

Submitted by Anonymous (not verified) on Fri, 21/05/2010 - 03:20.

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.

  • reply

Hi great post, it helped me a

Submitted by joel box - Mondial-IT (not verified) on Tue, 01/06/2010 - 17:54.

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 ?

  • reply

Sorry, found the answer

Submitted by joel box - Mondial-IT (not verified) on Tue, 01/06/2010 - 18:05.

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.

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Recent comments

  • ลา มะลิลา ขึ้นต้นเป็นมะลิซ้อน
    1 day 18 hours ago
  • YOU RULE, THANKS
    3 days 11 hours ago
  • สนุกใหญ่เลยนะ =D
    1 week 4 days ago
  • Same problem here ! Thanks
    1 week 4 days ago
  • เราเป็นเหมือนกันเลย
    4 weeks 1 day ago
more
Powered by Drupal, an open source content management system

Creative Commons License

This work by http://tewson.com is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
RoopleTheme