I am currently finalizing a site and I need to set up a different template for a portion of the site. This includes different navigation menus and also different blocks.

After doing my research, I discarded the multi site approach as it would require a second setup and did not fit the overall requirements.

I opted to use the Sections module version 5.x-1.2.

So far this module works well for my application. As long as I apply the template to a a number of pages by creating a list of node/xx references in the module visibility options.

Instead I want to take this a little further. I created a new content type called consular_pages. Then instead of applying the template by specifying the node numbers, I want to apply the template to all the pages based on the content type consular_pages.

So for the Sections module visibility options, I selected the php option to create a php filter. However when I try to check for the content type using php, I get an empty or null field for the node type thus my test always returns false.

sample code:

if($node->type =='consular_pages'){
return;
}

How come the test for $node->type returns a null for custom content types?

How can I test the for the content type?

Setup:
Drupal 5.3
Sections module version 5.x-1.2.

Thanks in advance for your input.

Sandro.

Comments

joachim’s picture

Stating the obvious here, but a bare 'return' statement returns FALSE...

gforce301’s picture

That and are you sure the node object is actually available in the scope you are trying to use it?