TPLix

No results for ""

Attributes

2 min read Jun 2, 2026

Most of the tags take attributes that specify or modify their behavior. Attributes to tplix functions are much like HTML attributes. Static values don't have to be enclosed in quotes, but it is required for literal strings. Variables with or without modifiers may also be used, and should not be in quotes. You can even use PHP function results, plugin results and complex expressions.

Some attributes require boolean values (TRUE or FALSE). These can be specified as true and false. If an attribute has no value assigned it gets the default boolean value of true.

{include file="header.tpl"}

{include file="header.tpl" nocache}  // is equivalent to nocache=true

{include file="header.tpl" attrib_name="attrib value"}

{include file=$includeFile}

{include file=#includeFile# title="My Title"}

{assign var=foo value={counter}}  // plugin result

{assign var=foo value=substr($bar,2,5)}  // PHP function result

{assign var=foo value=$bar|strlen}  // using modifier

{assign var=foo value=$buh+$bar|strlen}  // more complex expression

{html_select_date display_days=true}

{mailto address="[email protected]"}

<select name="company_id">
  {html_options options=$companies selected=$company_id}
</select>

Comments (1)

Affiliate Activate
Jun 2, 2026

Support TPLIX
TPLIX is a free and open-source template engine. If it helps your projects, consider supporting its development.

Buy me a coffee Every

Leave a Comment

Not published. Used to notify you on approval.

Comments are moderated before appearing.