Jump to content

CSS Stylesheet linked only to one specific tpl file (1.7)

Recommended Posts

I have a reusable "component.tpl" file, which I've placed in _partials folder (I import it in multiple pages) and I'd like to link a stylesheet (component.css) to this file/component.
Now, every time I import this component to a page I create an additional 'component.css' linking in theme.yml. I'm looking for a solution to prevent this behaviour and declare stylesheet only once and load this stylesheet only on pages where component.tpl is imported.

Anyone can give me any advice?

Edited by piczon
Added tags (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...