Difference: IncludeTopicsAndWebPages (10 vs. 11)

Revision 112009-03-11 - Main.TWikiContributor

Line: 1 to 1
 

Include Topics and Web Pages Using %INCLUDE{...}% Variable

Use the %INCLUDE{...}% variable to embed the content of another topic or web page inside a TWiki topic. The whole content or only parts of a page can be included. If needed, set a proxy server in TWikiPreferences.

Line: 56 to 56
 
  • I like apples better than oranges.
Changed:
<
<
Related Topics: VarINCLUDE, UserDocumentationCategory
>
>

5. Alert Box using Parameterized Include

Create a topic called AlertBox with the following content:

-----
%STARTINCLUDE%
<div style="border-color:#FF9933; border-style:solid; border-width:thin; width:85%;  margin: 0 auto">
<table cellpadding="5" width="100%" cellspacing="0" cellpadding="12" border="0">
<tr bgcolor="#FFBB55">
<td valign="top" width="16"><img src="%ICONURL{warning}%" width="16" height="16" align="absmiddle" alt="" border="0"></td>
<td><b> %TITLE% </b></td>
</tr>
<tr bgcolor="#FFCC66">
<td>&nbsp;</td>
<td> %MESSAGE% </td>
</tr>
</table>
</div>
%STOPINCLUDE%
-----
 
Added:
>
>
Now you can write %INCLUDE{ "AlertBox" TITLE="Alert" MESSAGE="This a test message" }% to get this:

Alert
  This a test message

The TITLE="" and MESSAGE="" parameters are passed into the include. Using this approach, you can create a library of boxes in the Main web, such as Main.NoteBox, Main.InfoBox.

Related Topics: VarINCLUDE, UserDocumentationCategory

 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.IncludeTopicsAndWebPages