SID-00329: Confluence Panel equivalent in TWiki
| Status: |
Answered |
TWiki version: |
4.3.1 |
Perl version: |
|
| Category: |
CategoryEditing |
Server OS: |
|
Last update: |
16 years ago |
How can we build a panel in TWiki like the one in Confluence?
http://confluence.atlassian.com/display/DOC/Panel+Macro
--
BoGao - 2009-05-21
Discussion and Answer
You can do that with parameterized includes. See doc at
VarINCLUDE,
IncludeTopicsAndWebPages, and example at
AlertBoxExample.
--
PeterThoeny - 2009-05-21
If I want to put some formatted content, for example, a table, in the panel, must I create seperate topic for each panel?
--
BoGao - 2009-06-01
Here is an alternative: Define preferences settings for start and end panel in WebPreferences of a web or Main.TWikiPreferences to make it effective on the site level.
Here is are example settings for a golden panel (on page level for demo) :
* Set GOLD_PANEL_START = <div style="border-color:#FF9933; border-style:solid; border-width:thin; width:60%; background-color:#FFCC66; padding: 10px; margin: 0 auto">
* Set GOLD_PANEL_END = </div>
Now you can use the
%GOLD_PANEL_START% ..
GOLD_PANEL_END% variables, also with complex content in between. For example, write this:
%GOLD_PANEL_START%
This is a normal paragraph.
* and a bullet
* one more
%GOLD_PANEL_END%
To get this:
This is a normal paragraph.
--
PeterThoeny - 2009-06-01
Thanks for answers so far.
The variable solution brings another question: Is
ParameterizedVariables implemented in latest release? It would be much better to have color as a parameter.
--
BoGao - 2009-06-11
ParameterizedVariables is not yet implemented. In the mean time you could define several start settings, such as
GOLD_PANEL,
GREEN_PANEL, and a generic =END_PANEL. Or you could use parameterized includes.
--
PeterThoeny - 2009-06-13
I am writing TWiki templates with
ParameterizedIncludes now, how ever, I still find inline marco/varible is necessary.
Regarding a template test case, I use following codes:
<verbatim>
Template:
%INCLUDE{ %TemplateName% %TemplateVars% }%
</verbatim>
%INCLUDE{ %TemplateName% %TemplateVars% }%
but I can't simplify them with a single include or marco
--
BoGao - 2009-12-18
I invite you to get involved with the TWiki community. Help refine the spec in
ParameterizedVariables, and help implement if you are a programmer.
--
PeterThoeny - 2009-12-18
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.