This tag can be used to check the extension used in request.
This is especially useful when you want to create different views of the same page depending on the extension used.
If there is no extension, this tag will not output anything. The dot before extension will not be output.
Examples
Creating different views depending on extension
In this example if no extension is used, The information is displayed as HTML, but if extension "json" is used, the information is output in JSON format.<b:if condition="<b:env.extension/> empty">
<b:get from="news" name="news" limit="5">
<h2><b:news.topic/></h2>
<b:news.body/>
</b:get>
</b:if>
<b:else>
<b:if condition="<b:env.extension/> = 'json'">
[
<b:get from="news" name="jsonnews" limit="5">
{
"topic": "<b:format.replace search="\"" replace="\\\""><b:jsonnews.topic/></b:format.replace>",
"body":"<b:format.replace search="\"" replace="\\\""><b:jsonnews.body/></b:format.replace>"
}
<b:if condition="<b:jsonnews.resultdata.last/> = 'false'">
,
</b:if>
</b:get>
]
</b:if>
</b:else>

