Question
Is there any way a user who perhaps doesn't have write access to the
WebPreferences can add an auxillary CSS to the
HEAD section of the page? My intention is for an
INCLUDE where inclusion of a
style section in the body would be unsuitable as the
INCLUDE could only be used once. Also it is not good practice in XHTML.
Environment
--
BrianTibbels - 25 Apr 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
I did this in my site. Just add in your templates in the HEAD section a %CSS%, and then your users can define their CSS via declarations like
- Set CSS = <style tyle='text/css'>...</style>
--
ColasNahaboo - 26 Apr 2008
This works ok for the topic you are woking on but fails if you use the set... in an
%INCLUDE file.
%CSS remains undefined. Is there a way of setting a variable in an include file? See
TestSet
--
BrianTibbels - 28 Apr 2008
We have no formal way to do that yet, although
ProcessAddToHeadAdds is getting defined now.
A kludgy way is to use a
%CALC{$SET(name, value)}% in the topic, and a
$GET() in the template's HEAD section. This works with INCLUDEs as well.
--
PeterThoeny - 29 Apr 2008