I began building what started as a two-column site without a right sidebar, but now, I need to add a right sidebar with custom content. I want to sometimes display an image there (different image depending on the page), and possibly related links that I specify based on the page. I don't believe I can just create a block and place it there as I need to specify different content depending on the page. The problem is, I have already created all of the pages in the site using the default Drupal Page content type. How can I specify custom content for the right column at this point? The only way I can think of doing it is creating a custom CCK page type that has a field for the right column, and adding this to my page template. I will have to recreate all of my pages in the site if I do it this way, I think? Is there any easier way to do this? Thanks!
Comments
=-=
thats one of the reasons NOT to use the same content type for every page you build.
if those pages have taxomony on them, you may be able to use views.module.
This is my first site in
This is my first site in Drupal - chalk this one up as a lesson learned. I did come across a blog post that recommended a module called NodeType that lets you change the content type. If I change my pages to a type with a CCK field for right column content, what code do I need to add to my template to display that field in the right column? Is
print $node->field_your_field[0]['view'];valid syntax?=-=
I'd use views and create a block display, adding the fields you want.
There is no taxonomy on my
There is no taxonomy on my pages, so I'm not sure I can do it this way.
=-=
but if you change your content types as you stated you were considering you can then also use views.module.
otherwise, you may have to do some manual SQL.