symfony - how to configure a public template variable
我想大声告诉你
我想大声告诉你 2017-05-16 16:45:09
0
1
457

How to configure a public template variable, I now want to configure a css domain name. I want to configure it in a public configuration file and then remove it from the template. How should it be configured and implemented in symfony2? Asking for configuration method and template calling method

我想大声告诉你
我想大声告诉你

reply all (1)
淡淡烟草味

In app/config/config.yml:

twig: globals: css_host: css1

In your template:

{{ css_host }}.example.com
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!