symfony - Sonata Media Bundle : acces media url -


i using sonata media bundle.

and wondering how can access media url in twig.
want url, not need show media.

any suggestions?

you have use path media helper:

{% path media, 'small' %} 

in above code, media instance of media entity, , small chosen format.

http://sonata-project.org/bundles/media/master/doc/reference/helpers.html#twig-usage


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -