Drupal if else pull image field url from page conent

1
2
<?php if (! isset($node)){?>
<?php } else{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You have to do ! isset node so Drupal knows what field name is associated with the content you are pulling from. Or else you get an error from pages that don't have the field_name.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.