Search

Assuming I have a master.xsl utility that matches / and contains my header and footer and in the middle calls

<div id="content">
<xsl:apply-templates/>     
</div>

...so that my individual page templates can take over the styling of the main content, how do you all conditionally include specialized CSS files?

I obviously want my CSS link to be in the <head> section, but by the time my individual page template is called, the head section has already completed.

I could put conditional statements in the master.xsl utility, but I am concerned it would become quite polluted with one-off conditionals that really shouldn't be handled outside of their individual templates.

Am I missing some feature of XSLT that would allow me to add a CSS link to the head section after the fact, or is there some other clean way to handle this problem?

Thanks for reading.

http://www.getsymphony.com/discuss/thread/56620/

Thank you! I knew I couldn't be the first who asked, but it is so hard to find posts in this forum with the search always using OR I end up with hundreds of results that aren't even sortable by recency and then I get all kinds of outdated posts... how did you find it?

When I'm searching the forum I usually uses google:

"search term" site:getsymphony.com

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details