Question
I have a noob question re styles. I've defined some fairly simple additional layout elements in CSS to make for some nicer graphics on a front page. Style sheets were added by use of:
* Set USERLAYOUTURL=/twiki/pub/
/CSSfiles/layout.css
* Set USERSTYLEURL=/twiki//CSSfiles/style.css
* Set USERCOLORSURL=/twiki/pub//CSSfiles/colors.css
The results were rendered appropriately by a manual edit of the source file. However, if the same content is input by editing the twiki topic, most of the div tags I used get removed. Do these things have to be input into a template file instead? If so, how do I specify templates on a per-topic basis?
The original source was like:
<div id="wrapper">
<div class="column">
<div class="disease">
<div class="col-top">
<div class="col-title">Disease & Medicine</div>
<div class="col-expand"><a href="DiseaseWide">⟩⟩Expand</a></div>
</div>
%INCLUDE{"DiseaseSummary"}%
</div>
</div>
</div>
Which got chomped down to:
<div id="wrapper">
Disease & Medicine
<a href="DiseaseWide">⟩⟩Expand</a>
%INCLUDE{"DiseaseSummary"}%
I am I just trying to something `unwiki-ish', or something else?
All pointers appreciated- thanks in advance.
Environment
-- JonathanManning - 15 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.
Okay, right now I can fix this by moving the whole code into a template file, using TMPL:INCLUDE to pull it into a 'topic template', and then using * Set VIEW_TEMPLATE = to pull in that template from the topic I'm editing. Seems a long way around, so I'd be grateful to know if I'm being a dingbat.
-- JonathanManning - 15 Apr 2008
I don't understand how to replicate that, so I'm going to ask a stupid question instead: do you have the same problem if you use 'span' tags instead of 'div'?
-- SeanCMorgan - 15 Apr 2008
I've got fairly large layout elements, I'm not sure I could get spans to do exactly the same thing convincingly- but thanks for the reply.
-- JonathanManning - 16 Apr 2008
I resolved this in the end- partly by not using the WYSIWYG plugin (which seems to do nasty things sometimes with css stuff- maybe I wasn't using it properly. But mostly I moved the layout into a template file.
-- JonathanManning - 22 May 2008