- Code: Select all
<?php echo $this->Html->link('<< Previous Product',array('controller'=>'products','action'=>'view', $product['Product']['id']-1)); ?>
<br/>
<?php echo $this->Html->link('Next Product >>',array('controller'=>'products','action'=>'view', $product['Product']['id']+1)); ?>
I tried declaring a variable $prevbtn equal to <img src="http..."> and replacing the current '<< Previous Product' with that $prevbtn but that just displays the html src code.

