OpenWGA 7.6 - WebTML reference

WebTML tags

<tml:include>

Description :
Including resources into the current page.
Derived from: Attributes:
show inherited attributes ...
Name Value(s) Purpose
ajax true | false Enables AJAX for included portlets if type="portlet"
designdb database-key Defines from which application a WebTML module should be included
encoding encoding-name Defines the text encoding of a URL resource if type="url"
forcestate true|false Defines on type="portlet" if the state of the portlet is determined by the server instead of the client. The default value is "false".
keepoptions options-name, option-name, ... Specifies WebTML options with a local scope, which are provided in the included WebTML module.
linkaction action-id Redirects all links and URLs in the portlet to a WebTML action
linkmedium media-key Determines the media key that included WebTML code uses to generate links
medium media-key used with type="tml|innerlayout|portlet": if defined the layout will be rendered in this medium 
name portlet-name Addresses the included portlet per portlet name
o_option value Shorthand for defining WebTML-Options
portletmode portlet-mode Defines on type="portlet" the basic portlet mode to set for the included portlet.
ref webtml-module | url reference to included resource
timeout milliseconds Defines a timeout for loading URL resources if type="url".
tmlscope scope Sets the WebTML scope for the WebTML Tags of an included WebTML module
type="innerlayout" innerlayout Includes the WebTML module which is defined as inner layout in the content type of the current document. With the attribute medium the medium of the layout could be chosen.
type="portlet" portlet Includes a WebTML portlet
type="tml" tml Includes the WebTML modul given in the attribute  ref.
type="url" url Embedding of externa Websites with URL.

Details:
With this tag you war able to include resources in the current WebTML page like other WebTML pages or HTML pages(per URL).

In most cases it is used with attribute type="tml" (default) to include WebTML modules by their name with attribute ref.

<tml:include ref="sidebar"/>

There is also a short form.

<tml:[sidebar]/>

With the tag <tml:option> you can configure the behavior of an included TML module

<tml:include ref="sidebar">
    <tml:option name="type">plain</tml:option>
</tml:include>

There is also a short form.

<tml:[sidebar] o_type="plain"/>


The use of two short forms can be combined.

The text body of the include tag will be accessible in the included WebTML module via WebTML option "body" (if there is no other option named "body") The following two code segments are equal.

<tml:include ref="sidebar">
    <tml:option name="body">
        MyBody
    </tml:option>
</tml:include>
<tml:include ref="sidebar">
    MyBody
</tml:include>


Examples:

A very simple "tml" include, including the WebTML module "tml-element":

<tml:include ref="tml-element"/>

An "url" include, adding the content of the page "www.innovationgate.de" to the current page:

<tml:include type="url" ref="http://www.innovationgate.com"/>

An "tml" include giving an option "body" to the included WebTML module:

<tml:include ref="windowview">

  <tml:option name="body">

      Hallo Welt

  </tml:option>
</tml:include>

Code of the included module can then put out the contents of the option by again using <tml:option> without content.

<div class="content">

  <tml:option name="body"/>

</div>

Resulting in the HTML code:

<div class="content">

  Hallo Welt

</div>