I want to have action specific CSS, meaning that it would only link the CSS for the actions that uses it (also for my jQuery stuff). Currently, I am just putting $this->headLink()->appendStylesheet('/styles/basic.css') in the view file of the action that needs the CSS. However, when I look at the source, it’s just out of place and I want it to be in the head section. I can load it up in the bootstrap, but I do not want to link unnecessary things for unrelated actions. Is there a way for me to load my action-specific CSS in the head section?
I want to have action specific CSS, meaning that it would only link the
Share
On your head section just
if you want to link js files then
Appending file in the phtml side