Secure pages not only support HTML/Markdown, but also supports handlebars syntax to inject dynamic variables and add custom logic.

Dynamic variables

Dynamic variables can be used within your custom page to display additional data to your users. They can also be used to add custom logic on your pages to show/hide content.

Displaying dynamic variables

Wrapping the variable within 2 opening & closing curly brackets will display the variable.

If you copy/paste the following code into the details section of your page, it will display the number of tags that have been programmed to that page.

<b>Tag count:</b> {{ page.totalTagCount }}
In the editor, it will show XXX as a placeholder for this variable, but tapping the tag will show the actual value

Hiding content when inauthentic

Content can be displayed conditionally by using the variables within a handlebars if/else statements. Let’s say you wanted to show a video to the user if they own one of your products.

You details would look something like this:

{{#if authentic}}

<iframe
	width="100%"
	height="315"
	src="https://www.youtube.com/embed/QH2-TGUlwu4?si=p5Zuwpd_8ZqEtozO"
	title="YouTube video player"
	frameborder="0"
	allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
	allowfullscreen
/>

{{else}}

<p>:(</p>

{{/if}}

You can copy/paste the above code into your page’s details and it would hide the video if the tag is inauthentic.

Available variables

VariableDescription
authenticThe authenticity of the URL
errCodeThe reason why the URL is inauthentic
ttCurrStatusThe current tamper status of the tag
ttPermStatusThe permanent tamper status of the tag
organization.nameThe name of your organization
organization.instagramThe instagram account of your organization
organization.websiteThe website URL of your organization
page.nameThe specified name of the page
page.creationDayThe numbered day that the page was created
page.creationMonthThe numbered month that the page was created
page.creationYearThe year that the page was created
page.totalTagCountThe number of tags that have been programmed for the current page
tag.idThe tag’s ETRNL id
tag.uidThe tag’s UID
tag.creationDayThe numbered day that the tag was created
tag.creationMonthThe numbered month that the tag was created
tag.creationYearThe year the the tag was created
tag.counterRepresents how many times the tag was tapped at the time that the URL was created
tag.encThe URL’s dynamic encrypted message
tag.cmacThe URL’s dynamic CMAC