| Include Topics and Web Pages Using %INCLUDE{...}% Variable
Use the %INCLUDE{...}% variable to embed the content of another topic or web page inside a The Caboteria topic. The whole content or only parts of a page can be included. If needed, set a proxy server in TWikiPreferences. |
|
-
rev="1.x" : The rev parameter is optional and allows you to include an earlier revision of a topic. This can be used to include an official version of a topic, e.g. one that has been signed of by management. This parameter does not apply to URLs.
|
|
< < | Note: All text of a topic is included unless you specify %STARTINCLUDE% , %STOPINCLUDE% and/or a pattern parameter. |
> > | Note: All text of a topic is included unless you specify %STARTINCLUDE% , %STOPINCLUDE% and/or a pattern parameter. A pattern will only search between %STARTINCLUDE% and %STOPINCLUDE% . |
|
Usage Examples |
| </pre>
|
|
< < | 2. Display Yahoo's robot.txt file
- You type:
-
%INCLUDE{"http://www.yahoo.com/robots.txt"}%
3. Display the SUNW stock quote in a TWiki page |
> > | 2. Display Google's robot.txt file |
| |
|
< < |
-
-
SUNW: %INCLUDE{"http://finance.yahoo.com/q?s=SUNW&d=v1&o=t" pattern="^.*?>SUNW</a>[^<]+(.*?)\s+\S+\s+<small.*"}%
- You get:
- Warning
- This site does not allow %INCLUDE% of URLs
|
> > |
-
-
%INCLUDE{"http://www.google.com/robots.txt"}%
|
| |
|
< < | 4. Display the temperature in San Francisco |
> > | 3. Display the current time in Tokyo in a TWiki page |
| |
|
< < |
-
-
San Francisco: %INCLUDE{"http://weather.yahoo.com/forecast/San_Francisco_CA_US_f.html" pattern="^.*?([0-9]+\º\;F).*"}%
|
> > |
-
-
Tokyo: %INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%
|
| |
|
< < |
- Warning
- This site does not allow %INCLUDE% of URLs
|
> > |
- Warning
- This site does not allow %INCLUDE% of URLs
|
|
See also other TWikiVariables. |
|
< < | -- PeterThoeny - 15 Jan 2003 |
> > | -- TWiki:Main.PeterThoeny - 15 Aug 2004 |
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria?
Send feedback Note: Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.IncludeTopicsAndWebPages.