Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Issue Use stylesheetLink

Hallo, before i use stylesheet like :

<link rel="stylesheet" href="/xxx/css/screen.css" type="text/css" media="screen, projection" />

Now i want to use phalcon tag :

    {{ stylesheetLink("/xxx/css/screen.css") }}

but it's doesn't work, how to implement media=> screen ???

edited Jun '15

hi, u can use

{{ stylesheet_link('css/test.css') }}

or maybe your rewrite rule does not work



20.1k
Accepted
answer

You can pass an array to stylesheetLink that will do what you need.

Look at this:

https://github.com/phalcon/cphalcon/blob/master/tests/unit/Phalcon/Tag/TagStylesheetlinkTest.php#L235

In your case the syntax should be:

{{ stylesheet_link(['css/test.css', 'media':'screen,projection']) }}