2

I have a question about tabs. I'm using a content type hotel with all the information about a hotel for example, hotel residence, location, food, spa, sports ... At this moment this is just one big list of text. I was trying to make tabs for it because this is I think the solution. I was trying it with the module quick tabs but there I have to use nodes or views to make the tabs so i don't know what to do know because it's impossible to put every element (location, food,...) from every hotel (40) in a view. Do you guys have any ideas? Thanks for your help.

4

Sounds like you want to use the Field Group module.

This module allows you to group a number of fields on a content type together. You can then choose from a number of different display options for that group, including tabs.

1

I needed something similar for an estate agent style site and made Build mode tabs to allow you to use custom build modes (view modes in D7) as custom tabs. This worked well for me because I wanted some of the same fields shown on different tabs. It's only D6 but I'd be happy to port it if there was interest.

0

If I understand what you are trying to do ... views can certainly handle all the hotels etc. To do so:

  1. Create taxonomy vocabularies that cover each category of information you want, such as location, food, amenities etc.
  2. Create a new article content type with fields (requires Chaos Tools enabled) attached to each vocabulary. This permits you to create tags for each category stored in a field of the content type.
  3. Create a view definition and configure a view page in it to filter on specific fields. Give it a path name such as hotel/%/general Set the menu type to default tabs (parent exists) and give the tab a name. THe % is a wildcard and is used for contextual filtering. This allows dynamic responses by views to the URL name you place in the % position.
  4. Create another view page in the same view definition and configure its filters differently. Give it a path such as hotel/%/<a different category> and define its menu as menu tab (parent exists).

If properly configured, you would have a view that responds to hotel/% and displays the default filtered pages and two tabs, one for a default and the other for your other tab. IF you are new to DRupal, some of this may not make sense. I suggest you watch the video series "Taming the Beast"at nodeone.se to get a handle on what views does and then come back to Drupal.stackexchange, I am sure there will be more questions :)

  • if i understand everything well. I have to create a new CT with taxonomy linked to the fields (taxonomy (location) = field(location) When i'm setting up my view i can add the taxonomy into my filter (=to only display that field) At this moment I have for example hotel1/facilities, hotel2/facilities, hotel3/facilities... With the % wildcard the view can be used as for example %/facilities, %/wildcard, ... .am I right – Niels Dec 7 '11 at 17:03
  • 1
    I believe the path cannot start with %, so you would need paths such as hotels/%/facilities. – Ashlar Dec 7 '11 at 17:34
  • hotels/hotel1 would be an actual article page that contains information on hotel1. Setting a field with terms such as location, amenities, etc. creates a flag for the article and view pages (in a view definition) that can be set to filter for articles with that flag. You would then create a contextual filter to see which hotel is in the URL % position and the view will only show the specified hotels amenitities or location info article. – Ashlar Dec 7 '11 at 17:41
  • I am concerned that this may be a bit confusing if your not familiar with views. Watch the videos and it will be a lot clearer. – Ashlar Dec 7 '11 at 17:42
  • 1
    Hello @JoeS. I was trying to fix the problem with your solution but I wasn't able to do it. I have figured out another solution. I made a block from 2 elements with the CCK module and afterwards I used the blocks to show in the quick tab module. – Niels Dec 8 '11 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.