For some reason pathing to my theme folder to access an image using <img src="<?php print base_path() . path_to_theme() . "/images/arrow-sm.gif"; ?>" alt="Arrow" width="12" height="15" border="0"/> is not working?

Is there some kind of specific code I am missing?

<div class="box">
<div class="right-box-third-top">&nbsp;</div>
    <div class="right-box-third-middle">
<div class="featured-img"><?php print $node->field_featured_img[0]['view'] ?></div>

<div class="more-info"><a href="<?php print $node->path ?>" title="<?php print $title ?>">More Info <img src="<?php print base_path() . path_to_theme() . "/images/arrow-sm.gif"; ?>" alt="Arrow" width="12" height="15" border="0"/></a></div><h1><a href="<?php print $node->path ?>" title="<?php print $title ?>"><?php print $title ?></a></h1>

<?php print $node->content['body']['#value'] ?></div>
    <div class="right-box-third-bottom">&nbsp;</div>
</div>

Comments

hargobind’s picture

Version:6.x-1.0» 6.x-1.2

This is still partially an issue with 6.x-1.2.

When specifying path_to_theme(), it seems to work correctly when viewing a node, however if you Preview the node (while making edits), the path becomes "modules/node".

Any ideas?