Okay it might sound a little weird for me to ask a question about dynamic content-types seeing as that's what drupal is all about.. however I'm wondering if there is a preferred method to do a page template that will allow you to add hooks in to activate modules within the page.

for example

if I had a simple 2 column layout w/ main content and right rail next to eachother. would it be feasible to create a template that would take an argument (lets say something you can put in the description) like "$rightRail = twitter;" and then the page renders w/ a twitter module in the right rail?

I hope that makes sense. I'm running into an issue where we have a bunch of pages that look similar, except the rightrail has a very different information in terms of modules, etc... and I wanted to see what the best way to unify my template would be.

Right now the team is creating a new content type and page template for each type... and I don't like that.

thanks guys.


I am thinking you are wanting to learn more about blocks. You could, for example, have a block that output an iframe/html/whatever widget. In the blocks hooks, you can use all sorts of information to decide when to display it it, eg what page/url, what type of node, etc. So, for example with twitter, you could grab information/fields from the node it is being displayed next to and customize it appropriately.

| improve this answer | |

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.