Forum OpenACS Development: Re: Include specific CSS

2: Re: Include specific CSS (response to 1)
Posted by Gustaf Neumann on
xowiki has a similar problem with includes, since it has often different needs in the icluded parts (e.g. chat or ajax, ...). The includelets need often some css files or java script not available in the including page. when multiple includelets require the same include file, it does not make sense to include it multiple times.

to address this problem, xowiki has a ::xowiki::Page::requireCSS and ::xowiki::Page::requireJS. The code to view the toplevel page (method view in xowiki-www-procs) cares for producing the header stuff...

Outside xowiki is another story, but it should be possible with similar properties.