I'd say the real reason is that the image tag helper will produce paths relative to your project's web root, whatever the actual root of your server. In other terms, whether your symfony app is primarily accessible via
http://mysite/ or http://mysite/web/ The image_tag will always work. Cheers, François 2008/4/30 Charles Hilditch <[EMAIL PROTECTED]>: > ...and some developers don't like php in HTML tags ie. > > messy: > <img src="/images/myimage.gif" class="<?= $class ?>" /> > > neat... being php only (matter of preference really): > <?= image_tag("myimage.gif","class=$class"); ?> > > > 2008/4/30 Tom Haskins-Vaughan <[EMAIL PROTECTED]>: > > > > > I like the neatness of it. Especially when combined with a link_to tag. > > I'd rather not put html into a link_to so this helps me here. > > > > Another reason, I guess, is that you could move the image folder - for > > whatever reason - and then just change the config rather than going > > through all your img tags and doing it by hand/script. > > > > Other than that, I can't think. > > > > Richtermeister wrote: > > > Hi all, > > > > > > My HTML guys brought up the question what is really gained by using > > > the "image_tag" function instead of just using an img tag, especially > > > since the former adds processing time (albeit near zero)... > > > > > > I've been comfortable using the tag function, but now I'm double > > > guessing myself.. > > > Any takes? > > > > > > Daniel > > > > > > > > > > > > > > > > -- > Charles Hilditch > Web Developer > Mob: 0415 166 137 > [EMAIL PROTECTED] > http://www.crh-systems.com/ > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
