CakePHP: Accessing the controller or model from a view helper

Posted by tombazza on Stack Overflow See other posts from Stack Overflow or by tombazza
Published on 2010-03-29T10:03:13Z Indexed on 2010/03/29 10:13 UTC
Read the original article Hit count: 164

Filed under:
|

I have a view helper that manages generating thumbnails for images. The images are stored using a unique ID and then linked to a file resource in the database.

I am trying to find out if it is possible for the view helper that generates these images to access the model or controller directly, as it is not possible to load the image data at any other point in the controller work flow.

I know this is a bit of a hack really, but it is easier than trying to rebuild the entire data management stack above the view.

© Stack Overflow or respective owner

Related posts about php5

Related posts about cakephp