Defining a block

Use the "beginblock" and "endblock" directives with the name of the block.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Page containing blocks</title>
</head>
<body style="background-color: aqua">
<div>Begin page</div>
<div style="border: 1px solid red">

<!--$beginblock$myblock$-->
	<div style="background-color: aqua">
	This is a block from aggregated2
	</div>
<!--$endblock$myblock$-->
</div>
</body>
</html>

Including a block

Use the "includeblock" directives with the name of the provider, the page and the name of the block to retrieve. If no block name, the complete page is retrieved.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Block example</title>
</head>
<body style="background-color: yellow">
Page from aggregated1
<br />
<!--$includeblock$aggregated2$block.html$myblock$-->
This content will be replaced by the block "myblock"
<!--$endincludeblock$-->
</body>
</html>

Including a block with variables

Page accept variables $(variable_name) that will be resolved from esigate-vars.properties. This file is descripted in Configuration page.

in esigate-vars.properties :

myblock=block.html
myattributid=789
<!--$includeblock$aggregated2$$(myblock)$myblock$-->
This content will be replaced by the block "myblock" from block.html
<!--$endincludeblock$-->
</body>
</html>

or

<!--$includeblock$aggregated2$block.html?id=$(myattributid)$myblock$-->
This content will be replaced by the block "myblock" from block.html?id=789
<!--$endincludeblock$-->
</body>
</html>

Including page via <esi:include> directive

Use the "<esi:include>" directive to include complete page into aggregated output. Directive supports following attributes:

  • src - specifies page and provider which should be used for retrieving (in a " $(PROVIDER{'provider-id'})/)/page" format)

Processing <!--esi --> comments

Aggregator supports processing of esi-style comments (normal comments with 'esi' added: '<!--esi'). If esi-style comment is encountered in aggregtion page then comment definition is stripped and data inside comment is processed as usual data.

Defining a template

Use the "begintemplate" and "endtemplate" directives with the name of the template. Use the "beginparam" and "endparam" directives to delimit params (variable parts that can be replaced inside the template)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!--$beginparam$title$--><title>Title to be replaced</title><!--$endparam$title$-->
</head>
<body style="background-color: aqua">
Template from aggregated2
<!--$beginparam$content$-->Block to be replaced<!--$endparam$content$-->
</body>
</html>

Including a template

Use the "includetemplate" directives with the name of the provider, the page and the name of the template to retrieve. If no template name, the complete page is retrieved. Use directives "beginput" and "endput" to replace params inside the template.

<!--$includetemplate$aggregated2$template.html$--> 
<!--$beginput$title$--><title>Template exemple</title><!--$endput$--> 
<!--$beginput$content$-->
<div style="background-color: yellow">
Some text from aggregated1
</div>
<!--$endput$--> 
<!--$endincludetemplate$-->

Including a template with variables

Page accept variables $(variable_name) that will be resolved from esigate-vars.properties. This file is descripted in Configuration page.

in esigate-vars.properties :

mytemplate=template.html
<!--$includetemplate$aggregated2$$(mytemplate)$--> 
<!--$beginput$title$--><title>Template exemple</title><!--$endput$--> 
<!--$beginput$content$-->
<div style="background-color: yellow">
Some text from aggregated1
</div>
<!--$endput$--> 
<!--$endincludetemplate$-->
comments powered by Disqus