Skip to content
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

Group assets outputs all assets #374

Closed
cord opened this issue Oct 23, 2015 · 8 comments
Closed

Group assets outputs all assets #374

cord opened this issue Oct 23, 2015 · 8 comments
Labels

Comments

@cord
Copy link

cord commented Oct 23, 2015

http://learn.getgrav.org/themes/asset-manager#grouped-assets

when adding a grouped asset e.g.

{% do assets.addCss('theme://css/nucleus-ie10.css', {'priority':102,'group':'msie_10'}) %}

the tag

{{ assets.css({'group':'msie_10'}) }}

returns all assets - also those without having specified a group.

I would expect that only the assets of the same group would be returned.

@rhukster
Copy link
Member

This has been fixed a few days ago in develop branch. Can you try that?

@rhukster rhukster added the fixed label Oct 23, 2015
@rhukster
Copy link
Member

BTW you are doing it wrong.. you add the group with the {'group': 'msie_10'}, but you render by passing the group as a string: {{ assets.css('msie_10') }}.

The way you have it, it will not see a string, and just render the default group, hence all the other assets.

@cord
Copy link
Author

cord commented Oct 24, 2015

just updated to 1.0.0RC1:

using {{ assets.css('msie_10') }} still gives following error
"array_merge(): Argument #2 is not an array"

@rhukster
Copy link
Member

Oh I see. CSS doesn't support groups only JS. CSS is only valid in head so no point having multiple group support for it.

@cord
Copy link
Author

cord commented Oct 24, 2015

would be useful to group CSS assets for e.g. MSIE compatibility

@rhukster
Copy link
Member

Hmm. I guess I can see how having multiple groups in the head could be useful.. I can add it.. not a big deal.

@cord
Copy link
Author

cord commented Oct 24, 2015

great :)

rhukster added a commit that referenced this issue Oct 24, 2015
rhukster added a commit that referenced this issue Oct 24, 2015
rhukster added a commit that referenced this issue Oct 24, 2015
@rhukster
Copy link
Member

Ugg. committed to master accidentally.. should be in develop now though.

dimitrilongo pushed a commit to dimitrilongo/grav-elana that referenced this issue Oct 20, 2016
dimitrilongo pushed a commit to dimitrilongo/grav-elana that referenced this issue Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants