I'm trying to create the following site structure for one of my pages but am struggling a little bit at the moment. Was wondering if anyone could shed some light on this:

site.com/cars

This page will probably need its own content type as it'll have custom images and links e.g. badges of all the car companies. This will then need to link to the perspective car so the ford image would link to /ford.

site.com/cars/ford
site.com/cars/toyota

each of pages will display all the cars available for that manufacturer. This page doesn't need to have any content types of its own as it is just a bog standard listing page.

site.com/cars/ford/mustang
site.com/cars/ford/focus

These are content types of the details page of the cars.

Any ideas on how to do this properly would be great, i've been playing with taxonomies and entity reference modules but sure if i'm going about it right.

Comments

Tmanagement’s picture

Taxonomy is correct but also look at views. Without views you are limited in your styling and structuring. With a custom content type, correct taxonomy and views you will be able to deliver your project.

Jaggi’s picture

This what I thought, I currently have the following structure in my Taxonomy:

Cars
- Ford
- Toyota

I have two content types, cars and model. Cars has the manufacturer logo and description on it and model is the actual in-depth data.

I went through a route of assigning two taxonomy terms to the cars type (e.g. cars/ford) and one on the model (ford). This isn't working exactly as I'd like but I'm still playing around with it. Also watching some video tutorials on views from the link on the module page.

My problem was if I had one taxonomy on the cars content type (ford) and created a view for content type /cars and went to /cars because it wasn't assigned the cars taxonomy it returned no results. I'm hoping watching the rest of the videos will show me how to solve this using views or I'll have to my first method again and change the filtering on the view a bit more.

Tmanagement’s picture

Why not just one content type cars? In that content type you can place the brand batch and it will hold all information including type etc.

on page /cars, views will be able to show a grid of all brand batches and you should be able to link that batch to the page of /cars/brand with a listing of all cars available for that brand as well. Perhaps you must digg into intelligent rewriting links or use contextual filtering but I believe this should be possible.

Sorry that I am unable to give you explicit and clear guidance in this one. All I know is that taxonomy plus views is very very powerful and therefore I am almost positive that it will deliver what you need. It might take some time though before you completely understand how those two modules work and more importantly, play together.

Jaggi’s picture

Yea i guess I need to keep playing with it a bit more. The reason I did two content types instead of merging it into one is because I need to view those pages on their own and I though it would be cleaner to separate it out. I may re-evaluate that to see if I can come up with a better solution.

Also I wanted to have the ability to reuse the content types separately but this was all before I started using views and saw the power of that.

Thanks for you help so far.

zeezhao’s picture

You can also use http://drupal.org/project/nodehierarchy for organising content

Jaggi’s picture

Just to update I managed to solve this issue pretty easily in the end. Posting here so if someone finds it at least they will have the answer.

What I did first was create a cars vocabulary and then once created i choose the custom fields options in the vocabulary. In there I added the fields I needed so thumbnail for manufacturer and descriptions.

Then I created some terms filling in all the fields for each one so e.g. terms:

Ford
Vauxhall
Toyota

Once you've done this you can use the views modules to create a custom view and set it to display a taxonomy cars. Add the extra fields you created and create the view to point to /cars. Once this is done you're done. Going to /cars displays all the car manufacturers with their badges, clicking that shows all cars under that manufacturer and clicking a car shows the individual car information.

Simples.