Tbutton is an object used to create html button
Name | Mandatory | Description |
---|---|---|
template | Yes | The template that will be used to construct the button |
href | No | The href params of the link (<a href=”..”>) |
onclick | No | The onclick params of the link (<a onclick=”..”>) |
caption | No | The caption of the button (<a href=”..”>caption</a>) |
title | No | The Title of the link (<a title=”..”>) |
itemprop | No | The itemprop value of the button (<a itemprop=”..”>) |
extra_params | No | Extra params for the link (<a extra_params>) |
extra_class | No | Extra Class for the link (<a class=“Btn_main_class extra_class”>) |
asInput | No | Render the button as an <input type=“submit”> element |
type | No | Specifies the type of button (button, reset, submit) |
Name | Type | Description |
---|---|---|
create | String | construct a Tbutton object |
When the tag <#Button> is use without any path (like <#Button.caption> for exemple) then it's the Constructor of a TButton object that will be available via the var named Button.
We define the template of MyButton.html like this :
<a class="ak_btn_2 ak_btn_2_9<#if condition="<#button.extra_class checksum=1>"> <#button.extra_class><#endif>" href="<#button.href>" <#if condition="<#button.onclick checksum=1>"> onclick="<#button.onclick>"<#endif> <#if condition="<#button.title checksum=1>"> title="<#button.title xmlencode=1>"<#endif> <#if condition="<#button.itemprop checksum=1>"> itemprop="<#button.itemprop>"<#endif> <#if condition="<#button.extra_params checksum=1>"> <#button.extra_params><#endif>> <span> <#button.caption xmlencode=1> </span> </a>
if we call this function
<#Button Template="MyButton.html" Href="MyPage.html" Caption="Go to my Page">
the output will be
<a class="ak_btn_2 ak_btn_2_9">" href="MyPage.html"> <span> Go to my Page </span> </a>