Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ShErbO on
Greetings everyone,
Sorry I know it may sound trivial, but I need an "if statement" that does the following:
If (the current page is a BOOKpage or PAGE)
{
do stuff
}
I don't know the exact syntax for this. Your help is apprectiated :)
Comments
One more thing
If you could point me to some drupal development tutorial or something.. it would be great. I feel embarrassed to ask such a silly question :$
The thing is, the development handbooks were quite hard for me, as my programming experience is very limited.
Snippets section will help
Depends what you are trying to do, but for general help...
Have a look under:
Customising the full page layout and sections based on node type
http://drupal.org/node/45944
It's in the section:
PHPTemplate Theme Snippets
http://drupal.org/node/45471
Here's an example:
Mark
here ya go
if ($node->type == 'book' || $node->type == 'page') {
...
}
This is something you can use which is basic.