Hi,
I'm really hoping someone can help me here.
I want to change the background colour of a sidebar for just one section of my Drupal 7 site - so that it displays for both the node and the teaser page.
I've added a content type; mycontenttype.
I've created page--mycontenttype.tpl.php and given the sidebar a different div class.
That didn't apply the content type at all so I added a template.php file to my theme and copied in various suggested bits of php I found on the forum but none seem to apply the page--mycontenttype.tpl.php toboth the node and the teasers..
The following does apply the content type to the node but not the teasers and I don't understand php at all so don't know what to change/add/delete.
function white_preprocess_page(&$vars) {
if (isset($vars['node']->type)) { // We don't want to apply this on taxonomy or view pages
// Splice (2) is based on existing default suggestions. Change it if you need to.
array_splice($vars['theme_hook_suggestions'], -1, 0, 'page__'.$vars['node']->type);
// Get the url_alias and make each item part of an array
$url_alias = drupal_get_path_alias($_GET['q']);
$split_url = explode('/', $url_alias);
// Add the full path template pages
// Insert 2nd to last to allow page--node--[nid] to be last
$cumulative_path = '';
foreach ($split_url as $path) {