New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only output css on assets.outputCss #2408

Closed
konsultaner opened this Issue May 7, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@konsultaner

In my index.volt i used collections to output css an js like this

{% if cssCollections is defined and cssCollections is iterable %}
    {% for cssCollection in cssCollections %}
         {{ assets.outputCss(cssCollection) }}
    {% endfor %}
{% endif %}
{% if jsCollections is defined and jsCollections is iterable %}
    {% for jsCollection in jsCollections %}
         {{ assets.outputJs(jsCollection) }}
    {% endfor %}
{% endif %}

My controller adds a javascript and a css file to the same collection

$this->assets->collection('index')->addCss('css/index.css');
$this->assets->collection('index')->addJs('js/ng/index/app.js');

$this->view->cssCollections = array("index");
$this->view->jsCollections = array("index");

I assumed that the asset manager is smart enough to output one link tag and one script tag but in stead I got this result:

<link rel="stylesheet" href="http://localhost/css/index.css" type="text/css">
<link rel="stylesheet" href="http://localhost/js/ng/index/app.js" type="text/css">
<script src="http://localhost/css/index.css" type="text/javascript"></script>
<script src="http://localhost/js/ng/index/app.js" type="text/javascript"></script>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@dancebear

This comment has been minimized.

Show comment
Hide comment
@dancebear

dancebear Dec 12, 2016

Contributor

\Phalcon\Assets\Manager::output has parameter $type but not used

Contributor

dancebear commented Dec 12, 2016

\Phalcon\Assets\Manager::output has parameter $type but not used

@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Jun 21, 2017

Member

Fixed in the 3.2.x branch. Feel free to open new issue if the problem appears again. Thank you for contributing.

Member

sergeyklay commented Jun 21, 2017

Fixed in the 3.2.x branch. Feel free to open new issue if the problem appears again. Thank you for contributing.

@sergeyklay sergeyklay closed this Jun 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment