vaanipala
vaanipala

Reputation: 1291

cakephp: image not displaying

i'm trying to get an image to display in the cupcake forum and it is not displaying. Only the alt is showing up. Can someone tell me on what i'm doing wrong? My code:

  <?php echo $html->image('/forum/vendors/img/goto.png', array('alt' => 'goto', 'url' => array('controller' => 'topics', 'action' => 'view', $category['lastTopic_id'], 'page' => $category['LastTopic']['page_count'], '#' => 'post_'. $category['lastPost_id']))); ?>

thank you.

Upvotes: 0

Views: 2250

Answers (1)

swiecki
swiecki

Reputation: 3483

Cakephp's image URLs are relative to /app/webroot/img/, so assuming your app is named merry_flowers, you should have:

<?php echo $html->image('../../plugins/forum/vendors/img/goto.png', /*Rest goes here */; ?>

Or something similar, depending on your directory structure.

Upvotes: 1

Related Questions