For college we have to create a website with drupal. This website has to be for a travel agency that does surf vacations. We already have the basic website up and running but are kinda stuck with the destinations.

I will quickly explain how the website should be set up and our problem.

So bassicly a customer should be able to go to the page called "Destinations" and have a list of the 4 available countries where they could book a vacation. Like for example you have Australia and Costa Rica. However when a user clicks on for example Australia he should get a new list of possible locations within this country where he wants to go surf.

We have tried with many different ways to get this to work the problem however is that both the countries and local destinations should have a picture and a short description. Also the user should be able to select their "level" on the specific location.

What we have tried:

Taxonomy: We have tried using taxonomy but it doesn't allow us to give the right design to the website. It will list the countries but without any description or picture.

Ubercart: I wish this would have worked but somehow you can't create subclasses in ubercart or just only show a list of classes with views.

Thank you for taking your time and we hope to find a solution soon.

Kind regards.

  • 1
    Dude you want the 'entity reference' module. Nodes within nodes... – Alex Gill Nov 30 '12 at 15:46

A general out line is given below,

  • Create a content type for country, add your available countries with images and description

  • Create a destination content type, with necessary fields like
    image,description etc: (If you want process booking with payment, use Ubercart and create a product class Destination, modify the required fields)

  • Add a country field to destination contenttype of 'fieldtype' - Node Reference, choose widget as select list. This allows choose country on creation of a new destination

  • Use Views to list the destinations page, by selecting necessary fields,

  • Use views to create the list of related destinations based on the
    country name and save it as a block. So based on the country
    selection the destinations can be list in this block

  • If you are using online payment for booking use ubercart, otherwise
    on booking you can send an enquiry to admin.

Hope you got an idea on how to proceed.

UPDATE To get list of the destinations on clicking the country do the following

  • In your destination listing view, Add a 'Contextual filters'( Arguments in D6) and choose the 'country nodereference field'.
  • In your four country listing view, in fields choose Nid (Nid) also and choose 'Exclude from display ' option for that field.
  • Then in the 'Country name field' - click 'Rewrite results' and choose 'Output this field as a link' checkbox. In link path give path like below
  • eg: destinations/[nid] ie: where destinations is the path of the your destination page and [nid] is the token for the node id. Probably you have to just change 'destinations' only with your path.

Thats it, now on clicking the country it will goto destinations page which shows all destinations belongs to the particular country

  • Ok, thank you for your information, the node refernce thing is something we haven't used yet because our understanding of Drupal is limited. I will let you know what the result it but it sounds promising. – Thomas W Dec 2 '12 at 10:44
  • Ok so we done what you told us and it seems to go in the right direction. However we have one major issue right now. When you are on the page that lists all the countries and you click on a country, we get the description of that country and not the list of the destinations within that country. We have looked at views on how to change this but we can't seem to find the solution. – Thomas W Dec 2 '12 at 12:10
  • i updated the answer based on your requirement, see UPDATE section in answer – Anoop Joseph Dec 3 '12 at 12:41

If you want a ajax work it should be done by your own code.

If you don't care about load new pages then you can try with views.

Is this a drupal 6 project?


  • We don't know much about ajax and I think it should be done with Drupal. We have used views but I can't see how this could be used to solve our problem. If you could help us out with views maybe that would be much appreciated. – Thomas W Nov 30 '12 at 15:47

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.