Friday, December 23, 2011

link and image helper error

i try to use lightbox , i was follow all steps in this link but the
problem in the code

<a href="images/image-1.jpg" rel="lightbox">
<img src="images/thumb-1.jpg" width="100" height="40" alt="" />
</a>

i put images folder in the webroot

C:\wamp\www\tet\app\webroot\img\images

instead of the above code i use

$thumb = $this->Html->image('images/thumb-1.jpg');
$full = $this->Html->image('/images/image-1.jpg', array('rel' =>
'lightbox'));
echo $this->Html->link($thumb,$full, array('escape' => false));

but i still see this error

Missing Method in ImagesController

Error: The action <img src=" is not defined in controller
ImagesController

Error: Create ImagesController::<img src="() in file: app\controllers
\images_controller.php.

<?php
class ImagesController extends AppController {

var $name = 'Images';


function <img src="() {

}

}
?>

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: