I’ve written a module in Drupal 7 to output an overview page for a project management application. However Im not sure how to reference php variables in the block out put. This block content is to be displayed through the main content area.
I initially thought I might be able to do something like this (i.e. fullpath represent a path to an image which will change dynamically based on a returned db query).
$block['content'] = ("<div><p>Overview stuff <?php echo $fullPath?></p></div>");
However the php element doesn’t come through and I don’t think that’s the proper way to do it anyway. I’ve not yet had any experience with .tpl.php files but that might be the way to go. I’ve checked on google for a solution and currently going through the docs but not found something yet.
Can anyone give me a idea of how I should go about this?
Many thanks
Peter
I would do something like