<<O>>  Difference Topic IncludeTopicsAndWebPages (r1.7 - 15 Aug 2004 - PeterThoeny)

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

Use the %INCLUDE{...}% variable to embed the content of another topic or web page inside a UAIWiki 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:
>
>
    • %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:
>
>
    • Tokyo:

See also other TWikiVariables.

Changed:
<
<
-- PeterThoeny - 15 Jan 2003
>
>
-- TWiki:Main.PeterThoeny - 15 Aug 2004
View topic | Diffs | r1.7 | > | r1.6 | > | r1.5 | More
Revision r1.6 - 01 Feb 2003 - 12:26 - PeterThoeny
Revision r1.7 - 15 Aug 2004 - 07:36 - PeterThoeny