1

I'm new to Drupal and my first project is turning out quite complex, at least it is when I'm trying to do it with Drupal.

I would like a "project" content type, which on creation will be more than just a page. It should be a page with it's own taxonomy term. On this page there should be a view to show recent media posted to that taxonomy term, along with downloads, articles and a couple of other content types. Essentially the new project page pulls all the other content together.

As I am hoping to hand this site over to less technical people (I barely understand Drupal yet nevermind trying to teach all of this to a non-technical person!) and would like this page to just be set up automatically.

I think the process is this: On creation the page should add it's title as a taxonomy term under the current vocab, then set up a view for each content type to pull the newest content posted under it's term.

Does this make sense? If not I'll update it with more information but if anyone has any pointers/tips or actually knows how to do this then I would appreciate the help!

2

I'd like to regard content types as a template to create entity objects (much like classes in object oriented programming) rather then as a means to create pages.

I do not see a reason for each project to have its own taxonomy term. If there is a 1:1 mapping between terms and projects, you are effectively creating redundancy. This might be done at a later stage to facilitate using specific modules that rely on the taxonomy module.

Nodes of the content type "media" can be linked to nodes of the "Project" content type by adding a "node reference" field to the "Media" content type. In Drupal 6, the "Node reference" module is part of the Content Construction Kit; in Drupal 7, it has been moved into the References module.

You can use the Prepopulate module to create URLs that show the "Media" creation form with the "node reference" field for "Project" already populated. This URL can be linked to using hook_link() (in Drupal 6) or hook_node_view() (in Drupal 7) to create media from the project page.

The list of associated media can be shown on the project page using the Viewfield module. Alternatively, the project page can be overridden using the Panels module. A second alternative is to add the output of the view to the project node using hook_nodeapi(&$node, $op='view') (in Drupal 6) or hook_node_view() (in Drupal 7).

  • This is beginning to make sense to me now. I have a Project content type, under a project I want recent blog posts, press articles, downloads and media - So each of these content types will have a node reference field that allows the user to choose from one of the projects? This is working fine. I'm wondering though how I can render all of the content that has used the project in it's node reference on that project page? Edit: Sorry, i should add that I've tested using views/viefield but I'm looking for way this can work as a "template" and there is no setting up views for each project? – Graeme Aug 3 '11 at 5:23
  • I seem to have found the solution within the contextual filters of views. – Graeme Aug 3 '11 at 6:13
0

If it is a new project. I would suggest Drupal 7.

In Drupal 7 taxonomy terms can be treated as content. So rather than having a node and a term, you can just have a term.

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.