Forum OpenACS Development: Include specific CSS

Collapse
Posted by Dave Bauer on
Right now, its impossible to pass extra information to "header_stuff" or set any ADP properties from an include.

This is becoming more inconvenient as we try to cleanup the HTML. The easiest solution people have used is inline styles which cause a maintainence headache.

I think we need two utilities here
1) a way to "append" to header stuff, for example, from an include
2) a way to set title, context, etc from an include

I suspect we'll need a new ADP tag for this.

Collapse
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.