Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r7  >  r6  ...
IncludeTopicsAndWebPages 7 - 15 Aug 2004 - Main.PeterThoeny
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: 22 to 22
 
  • 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.
Changed:
<
<
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

Line: 34 to 33
  </pre>
Changed:
<
<

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

 
  • You type:
Changed:
<
<
    • SUNW: %INCLUDE{"http://finance.yahoo.com/q?s=SUNW&d=v1&o=t" pattern="^.*?>SUNW</a>[^<]+(.*?)\s+\S+\s+<small.*"}%
  • You get:
    • SUNW:

<-- template: messages.nat.tmpl -->
Warning
This site does not allow %INCLUDE% of URLs
>
>
    • %INCLUDE{"http://www.google.com/robots.txt"}%
 
Changed:
<
<

4. Display the temperature in San Francisco

>
>

3. Display the current time in Tokyo in a TWiki page

 
  • You type:
Changed:
<
<
    • San Francisco: %INCLUDE{"http://weather.yahoo.com/forecast/San_Francisco_CA_US_f.html" pattern="^.*?([0-9]+\&ordm\;F).*"}%
>
>
    • Tokyo: %INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%
 
  • You get:
Changed:
<
<
    • San Francisco:

<-- template: messages.nat.tmpl -->
Warning
This site does not allow %INCLUDE% of URLs
>
>
    • Tokyo:

<-- template: messages.nat.tmpl -->
Warning
This site does not allow %INCLUDE% of URLs
 See also other TWikiVariables.
Changed:
<
<
-- PeterThoeny? - 15 Jan 2003
>
>
-- TWiki:Main.PeterThoeny - 15 Aug 2004

Revision 7r7 - 15 Aug 2004 - 07:36:37 - PeterThoeny?
Revision 6r6 - 01 Feb 2003 - 12:26:52 - PeterThoeny?
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM