Well, here's what I want to do. I want to be able to upload photos to my 
website. Then I can display them in a gallery. Fairly straightforward. 
But I'd also like to be able to hard code some of the uploaded photos 
into my website. So I'd have the following:

<div id="newHouse">
   <h3>New House</h3>
   <?php echo funky_little_photo_helper(456, 'small') ?>
</div>

Which would output:

<div id="newHouse">
   <h3>New House</h3>
   <a href="/photo-viewer/my-new-house"><img 
src="/images/my-new-house-small.jpg" alt="Photo of my new house" 
width="100px" height="100px" /></a>
</div>

So the question is, do I use a peer method to output the html or create 
a helper to do this?

Tom

Thomas Rabaix wrote:
> Hello,
> 
> I am not sure what you mean by access the model. but an helper can
> have model as argument to perform a specific task. You cannot do any
> logic in a helper.
> 
> Thomas
> 
> 
> 
> 
> On Tue, May 6, 2008 at 9:58 PM, Tom Haskins-Vaughan
> <[EMAIL PROTECTED]> wrote:
>>  I'm about to start writing a helper. Is there any reason why I shouldn't
>>  access the model from a helper?
>>
>>  TIA
>>
>>  Tom
>>
>>  >
>>
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to