Project | WXT | Basics | Download | Documentation | Samples

PI: fragment

The purpose is to import a fragment defined in the script: Fragment .

<?_wxt fragment id="" ?>

The parameters are:

id (mandatory) The id of the fragment we want to import. The following fragments are always defined for a module:
  • _name
  • _id
  • _summary
  • _description
  • _author
and will always produce a value.
form (optional) Possible values are id, short and full. full is default and displays the content of the fragment. If short, only the short value of the fragment is displayed.
form has no effect on fragments: _id, _name,_description and _summary.

Examples:

This:

<div>
<?_wxt fragment id="_name"?>
</div>

may produce this:

<div>
My module
</div>

This:

<div>
<?_wxt fragment id="f1"?>
</div>

may produce this:

<div>
<span><img alt="self1" src="http://www.ia.hiof.no/~borres/self/bs1.gif"></span>
</div>

assuming that the following is defined in the script

<fragment id="f1">
<![CDATA[
<span><img alt="self1" src="http://www.ia.hiof.no/~borres/self/bs1.gif"></span>
]]>
</fragment>

This:

<div>
<?_wxt fragment id="f1"?>
</div>

may produce this:

<div>
<span><img alt="self1" src="http://www.ia.hiof.no/~borres/self/bs1.gif"></span>
</div>

assuming that the following is defined in the script

<fragment id="f1" location="fragfile.txt"/>

and the file, fragfile.txt, has this content:

<span><img alt="self1" src="http://www.ia.hiof.no/~borres/self/bs1.gif"></span>