Jump to content

Edit History

piczon

piczon


Added tags

Hello,
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?

piczon

piczon

Hello,
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?

×
×
  • Create New...