Daya Bay Reactor Neutrino Experiment
TWiki > IncludeTopicsAndWebPages (10 vs. 11)
Daya Bay webs: Public | 中文 | Internal | Help   Log In or Register

Welcome | Register | Changes | Topics | Index | Search | Go
 <<O>>  Difference Topic IncludeTopicsAndWebPages (11 - 2009-03-11 - 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 Public web, such as Public.NoteBox, Public.InfoBox.

Related Topics: VarINCLUDE, UserDocumentationCategory


View | History: r14 < r13 < r12 < r11 | More

View | History: r14 < r13 < r12 < r11 | More
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.IncludeTopicsAndWebPages.