You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yunfeng Hou <ho...@yahoo.com> on 2006/05/24 09:08:45 UTC

include link

IncludeLink is used to include another html file into
current file, it is a sub-class of ExternalLink, so
you can use paramter page and parameters to control
the included page.

use include, we can seperate pages into small pieces,
which will have better reusabilty and can have
different caching control. For example, UserInfo.html
can be included into another cachable page, but
UserInfo.html is not cachable. The page will display
the current logged in user, or a login form if not
signed in.

Parameters:
page: included tapestry page, with extension omitted.
parameters: parameters passed to the page. (see
ExternalPage)
url: a free style url, can point to any web resources
ssi: using ssi or client side include

(note: one of page and url must be provided)

ssi: generate html with ssi enabled, web server must
have ssi enabled
<!--#include virtual="/cgi-bin/counter.pl" -->

Client side include: use javascript to include the
file, browser must have javascript enabled.

There are two methods to control whether the
IncludeLink use ssi or not.
1. global setting. in hivemodule.xml add the following
config:

2. specific to the SimpleLink, just set the ssi
parameter of the component

Usage:
<span jwcid="include1@common:IncludeLink"
page="include" />

<span jwcid="include2@common:IncludeLink"
url="include.html" ssi="false" />

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com