I added a function called link_href to ../helpers/Functions.php and it allows me to link image buttons to item pages. Is there a better way to code this with one of the current functions or would this be something beneficial to add to the global Functions page?
Code in Functions.php:
function link_href($record, $action='show', $text) {
$path = $record->getPluralized() . DIRECTORY_SEPARATOR . $action . DIRECTORY_SEPARATOR . $record->id;
return '<a href="'. uri($path) . '">' . ($text) . '</a>';
}
Code on frontend:
<?php $orangebot = img('orange-btn.gif'); ?>
<?php echo link_href($featuredItem,show,"<img src=$orangebot border='0' >"); ?>
You can see the theme that I am developing here: http://euclidcorridor.dreamhosters.com/