Interesting uses of the TWiki INCLUDE directive
% INCLUDE{"TWiki.WebRssBase"}%
% INCLUDE{"Software.BeepProtocol"}% ... Software.BeepProtocol -- 25 Jul 2003
You can define what part of a twiki page will be included. You do this using the %STARTINCLUDE% and %STOPINCLUDE% directives on the included page.
When defining skin templates you can include one template within another, using the TMPL:INCLUDE directive:
% TMPL:INCLUDE{"twiki.void"}%
Skin templates can also include a twiki topic as part of the skin output:
% TMPL:DEF{"TopBar"}% % INCLUDE{"FlexibleSkinTopBar"}% %TMPL:END%
You can include an entire web page:
% INCLUDE{"http://www.fvrl.org/events/index.cfm?listexpand=nav2053&buttontext=Book%20Sales"}%
You can include just part of a web page, by setting to/from patterns:
% INCLUDE{"http://www.wrh.noaa.gov/cgi-bin/wrhq/TotalForecast.csh?TotalForecast+Portland+WA+039"
pattern="^.*?(<table BORDER=0.*?<td>=).*"}% </font></font></table></table>
connection:close in the HTTP header. This will force the connection to close rather than wait for it to timeout. At about line 60 change as follows:
my $req = "GET $theUrl HTTP/1.1\r\n$theHeader\r\n\r\n";to
my $req = "GET $theUrl HTTP/1.1\r\n$theHeader\r\nConnection: close\r\n\r\n";Thanks to Paul:Main/WebHome for pointing this out. See also TWiki:Codev/IncludeHTMLTakesLongTime. -- DaleBrayden - 31 Jul 2003