Hey All,

I'm having major difficulties with Drupal and need your help. I am working on a web site and I want to customize individual node types. For example:
Visit http://avant-gclothing.com/about. The header, footer, and menu stay the same on all pages, however, the content format is changed. On different pages, different div ids and classes are used. How do I theme individual nodes? I tried page-node-about.tpl.php and node-about.tpl.php and the same thing but with the node id (so page-node-1.tpl.php) and neither work. I'm not sure if that's because they're not right or if the cache isn't being updated. Also, how do I set it that only if a page is not on the menu, you have a sidebar. So, conceptually,

if(page != on_primary_links) {
sidebar();
} else {
}

Also, I need the blog part (http://avant-gclothing.com/blog) to show like http://khanik.com/clients/ag/blog.html? How do I format individual blog posts on an archive like page? I do format them on a singles page? I can I customize the sidebar?

So far, my experience with Drupal and Ubercart has been really bad, and I prefer MODx and Wordpress much more. However, neither the latter two offered the functionalities I needed, so I'm stuck with Ubercart and HAVE to finish this within a week and a half. So help is much appreciated. Thanks.

Comments

hferree’s picture

Sorry, can't help you with the if the page is not on the menu....You could always specify a block to appear on those pages with the names of the non menu links there. Insert HTML for the links manually for each of those pages. Or put all pages on the menu, have breadcrumbs, disable the ones that you don't want on the menu. That way you should links to all the pages but not make your menu cluttered. (i think breadcrumbs can do that).

If you want to theme different content types (like products) you would create a node called node-product.tpl.php (node-contenttypename.tpl.php). Only products would have the new theme and the content styled that way. So create a different content type and node-contenttypename.tpl.php for each different style that you want. You can also add specific html or css in the body section of each page if you need additional changes.

To make the /about page use the page-about.tpl.php template & check out this thread. I've had trouble with the naming of pages (other than node types) and found a php snippet that helps: http://drupal.org/node/335513

As for the blog, you can create a new node template for it as mentioned above (this file will format both the teaser and full node). Also views helps because you can show either the full node or just a teaser view on a page.

Sorry your experience hasn't been good. Drupal takes some getting used to--than you'll love it with all of its nice features. I recommend Pro Drupal Development (it's really helped me) and I believe a new book has come out that's specific to themeing.

Hope that helps.