2

I have installed my assets using:

php app/console assets:install web/

and the public resources have been moved to the web folder without problems.

I now want to access these assets from my php view scripts, but can only find twig examples. Can anyone show me how to accomplish this....

<link rel="stylesheet" href="{{ asset('bundles/acmedemo/css/demo.css') }}" type="text/css" media="all" />

in a php view script??

Thanks!

1 Answer 1

3
href="<?php echo $view['assets']->getUrl('bundles/acmedemo/css/demo.css') ?>"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks mate! I actually found it in the docs about a minute after posting this. Found it here link Thanks for replying though!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.