I'd like direction with making it so that I have a list of relevant "model" nodes in the footer of each node of "makes"
An example might be;
xxxxxxxxxxxxxxxxxxxx Ferrari Cars (Node) xxxxxxxxxxxxxxxx
Node content about Ferraris- abc abc abc abc abc
abc abc abc abc abc etc...
MODEL LIST (a list of linkable node titles under Ferrari category)
Enzo
Dino
Testarossa
Mondial
xxxxxxxxxxxxxxxxxxxxx Close Node xxxxxxxxxxxxxxxxxxxxxxx
How would I do this from an architectural point of view? Would I create a "Ferrari" Category under a "Make" Vocabulary and then somehow make a block inside the "Make" Content Type to hold a View listing the Node titles classified as Ferrari? If this is a reasonable approach, how would I create the block to hold the view inside the Node in practical steps?
Or is there a completely different approach that could be better?
Thanks in advance..
Comments
In my opinion, taxonomy can
// accidental double post //
: z
In my opinion, taxonomy can
In my opinion, taxonomy can be more trouble than it's worth in a situation like this. It seems redundant and confusing to have to maintain a node named Ferrari as well as a taxonomy term named Ferrari. My clients can't ever seem to wrap their heads around the idea.
Here's is how I flushed out your example with with only Views and CCK:
Add the following line to your node.tpl.php
If you are using a custom make.tpl.php template, you just need:
The above code will print out an embedded model_list_view using its own nid as the argument for the node_reference field.
Here is a minimal (and temporary) example
-zach
--
harkey design
: z
Nice Example
Thanks Zach - that's a nice example to see, even though it wasn't my question. It's given me some ideas.
Another alternative is to use the "Category module", which is an integrated replacement for the book and taxonomy modules. The original question almost seems a textbook case for the type of thing it was developed for (beware it is a big module though, and can be a bit fussy working with some other modules)
With category module, you'd potentially just create a container "Make", and create categories under it of "Ferarri" etc. Under category module, categories and containers are nodes and so have text and can have cck fields. Also there is a category views facility to use a view to display the node listing for the category.
For just that case Zach's solution would be simpler than getting the category module going, but it depends on what extra things you want to do. In my opinion the Category Module is at its best in hierarchical sites.
I tried really hard to love
I tried really hard to love the category module, and I've made several wholesale attempts to jump on board, however in the end, I always end up bailing out for a simpler approach. I've yet to see the category module result in a manageable workflow. If anything it manages to hopelessly obscure it. (Just working your way through the settings for a single container can take the better part of a day.) I also don't trust all the necessary wrappers (especially on a multi-site install).
However, the way the category module treats categories as nodes make a lot of sense to me. I'm just weary of committing to it.
I guess at the end of the day, I'm always struck by how difficult it is to execute what seems to be such a common structural convention in Drupal.
-zach
--
harkey design
: z
Thanks a lot Zach - some follow on questions...
Very elegant solution and example - thank you.
I have an additional couple of questions that have led on from this.
1) I had trouble getting the autocomplete node reference to work - the drop down works fine though. Is there a common trap I might be falling into with this one?
2) I have created a link field to an external site in the Make node - how can I make this field referenced in the Model field automatically?
3) Can I make it so that the categories of the Make also get passed on to the categories of the model as well?
Again - many thanks for you help :)
Duncan