Insert output text from a named XML block
Includes any valid XML/HTML markup
The name of the XML block to insert. Blocks are identified using the
This tag has been added with version 0.9.32 of the Presentation Engine and is not available in previous
versions. It is possibleto write a macrotag that simulates
this functionality in earlier versions.
This tag allows the author to insert the output of a block of XML into the output of a page. This
is most often used in conjunction with the <rb:block ...> tag
which identifies a block.
The name attribute idenfies the block we want to include in the output
stream. Blocks are identified by marking them with an rb:id
Use of this tag can help you structure your presentation pages in a way that makes their behaviour clearer,
which in turn of course aids maintainance.
When the <rb:insertblock...> tag is encountered when generating a page, the Presentation Engine will
search the XML tree for the named block. If the block is not found then no output is generated.
If the named block is found then the XML subtree is executed and the textual output from that tree
is used to replace the <rb:insertblock...> in the output stream.
Note that the XML tree itself is not copied. That is the XML DOM itself is not modified by this tag.
This is a very simple example of how to structure a page so that it is easy to maintain. Note that
this technique is especially powerful when one considers that the blocks can be included in a header file
allowing the same header/footers etc to be applied to all pages very easily.
<!-- Logo, links etc that appear at the top of the page -->
<!-- Menu that appears at the left -->
<!-- Footer with copyright notice etc -->
<table cellpadding="0" cellspacing="0" border="0">
<p>This is the bit that changes</p>
You can combine the an rb:insertblock tag with the rb:test attribute to make blocks
conditional. The example above could be extended for example to include a login-block, which is only included if the
site visitor is currently not logged into the site.