After some poking around in symfony, it seems that there is no support
for linking to assets in your web folder.  That is, if you have a file
you need to link to in your project/web/ folder, the only way to do so
is to link to it absolutely.

Would it be realistic to do something like this?

<?php echo link_to('Download', '//path/to/download.tar.gz') ?>
==> <a href="/symfony/project/web/path/to/download.tar.gz">Download</
a>

It seems that this functionality can be easily added to
sfWebController::genUrl() by putting the following towards the top of
that method:

    if (!is_array($parameters) && substr($parameters, 0, 2) == '//')
    {
      return $this->getContext()->getRequest()->getRelativeUrlRoot() .
'/' . substr($parameters, 2);
    }

What does everyone think of this?  Obviously, the // token can be
anything.

Carl


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to