SiteGUI uses Smarty template system (https://www.smarty.net), facilitating the separation of presentation (HTML/CSS) from application logic. In Smarty, variables are pretty much like PHP variables, that means you can reference array variables by their key like $array["key"] or by specifying the key after a dot "." symbol like $array.key. Variables in Smarty can be either displayed directly or used as arguments for functions, attributes and modifiers, inside conditional expressions, etc. To print a variable, simply enclose it in {} ( {$variable} ) so that it is the only thing contained between them. Template Designers should get familiar with Smarty template syntax by referring to the official Smarty Documentation.
In addition to Smarty default variables, a Page or App Record should have the following variables available
Sample template variables and data
Array
(
[sitegui] => 1
[token] => 68a00a20a
[site] => Array
(
[id] => 1000
[name] => SiteGUI
[url] => sitegui.com
[tier] => 1
[server] =>
[template] =>
[status] => Active
[owner] => 123456
[revision] => 1
[version] => 1
[auto_upgrade] => 1
[language] => en
[timezone] => America/New_York
[editor] => wysiwyg
[logo] => https://cdn.sitegui.com/bootstrap5/assets/img/logo.png
[locales] => Array
(
[en] => english
)
[cdn] => https://cdn.sitegui.com/public/templates/global
[account_url] => https://my.sitegui.com/account
)
[template] => lumen
[api] => Array
(
[status] => Array
(
[result] => success
)
[page] => Array
(
[id] => 398
[type] => App
[subtype] => Feature_Request
[name] => Add New Entry button for public app page
[slug] => /feature_request/add-new-entry-button-for-public-app-page
[title] => Add New Entry button for public app page
[description] =>
[content] => There is no button to create a new entry when viewing an app. Please add it.
[image] =>
[creator] => 123456
[created] => 1676311649
[updated] => 1676342248
[published] => 1676342248
[expire] => 0
[private] =>
[status] => Backlog
[menu_id] =>
[breadcrumb] => 1
[layout] =>
[views] => 0
[meta] => Array
(
[category] => Array
(
[0] => Improvement
)
)
[public] => Array
(
[rating] => 4.5
[count] => 11
)
)
[app] => Array
(
[sub] => Array
(
[Comment] => Array
(
[entry] => multiple
[display] => flat
)
[Like] => Array
(
[entry] => single
[display] => grid
)
)
)
[subapp] => Array
(
[Comment] => Array
(
[show] => Array
(
[content] => Array
(
[type] => textarea
[label] => Content
[visibility] => client_editable
)
)
[fields] => Array
(
[attachment] => Array
(
[type] => file
[label] => Attachment
[visibility] => client_editable
[column] => 1
[is] => multiple
)
)
)
[Like] => Array
(
[fields] => Array
(
[name] => Array
(
[type] => radio hover
[label] => Feeling
[is] => optional
[visibility] => client_editable
[options] => Array
(
[👍] => 👍
[🤔] => 🤔
)
)
[status] => Array
(
[type] => rating
[label] => Rating
[is] => optional
[visibility] => client_editable
[column] => 1
)
)
)
)
[collections] => Array
(
[0] => Array
(
[id] => 549
[type] => Collection
[subtype] => App::Feature_Request
[slug] => /feature_request/category/improvement
[name] => Improvement
)
)
[related] => Array
(
[0] => Array
(
[id] => 2448
[type] => App
[subtype] => Feature_Request
[slug] => /feature_request/hide-the-sample-code
[name] => Hide the sample code
[description] =>
[image] =>
)
[1] => Array
(
[id] => 3396
[type] => App
[subtype] => Feature_Request
[slug] => /feature_request/add-supervisor-as-a-special-value-for-poster-in-app-builders-actions
[name] => Add {{supervisor}} as a special value for {{poster}} in App Builder's Actions
[description] =>
[image] =>
)
)
)
[links] => Array
(
[subapp] => /feature_request/add-new-entry-button-for-public-app-page
[file_view] => /file/view
[update] => https://my.sitegui.com/account/app/update
)
[html] => Array
(
[ajax] => 1
[breadcrumbs] => Array
(
[0] => Array
(
[name] => Feature Request
[slug] => /feature_request/
)
[1] => Array
(
[name] => Frontend
[slug] => /feature_request/category/frontend
)
[2] => Array
(
[name] => Styling
[slug] => /feature_request/category/styling
)
)
[top_menu] => Array
(
[0] => Array
(
[id] => 1
[type] => Page
[subtype] =>
[name] => Home
[slug] => /index.html
)
[1] => Array
(
[id] => 5
[type] => Page
[subtype] =>
[name] => Support
[slug] => #
[children] => Array
(
[4] => Array
(
[id] => 4
[type] => Link
[subtype] =>
[name] => Tickets
[slug] => https://my.sitegui.com/account/app/ticket
)
[3] => Array
(
[id] => 3
[type] => Link
[subtype] =>
[name] => Open Ticket
[slug] => https://my.sitegui.com/account/app/view/ticket
)
)
)
)
[footer_menu] => Array
(
[0] => Array
(
[id] => 5
[type] => Page
[subtype] =>
[name] => Support
[slug] => #
[children] => Array
(
[4] => Array
(
[id] => 4
[type] => Link
[subtype] =>
[name] => Tickets
[slug] => https://my.sitegui.com/account/app/ticket
)
[3] => Array
(
[id] => 3
[type] => Link
[subtype] =>
[name] => Open Ticket
[slug] => https://my.sitegui.com/account/app/view/ticket
)
)
)
[1] => Array
(
[id] => 7
[type] => Page
[subtype] =>
[name] => Company
[slug] => #
[children] => Array
(
[6] => Array
(
[id] => 6
[type] => Page
[subtype] =>
[name] => Contact Us
[slug] => /contact
)
[8] => Array
(
[id] => 8
[type] => Page
[subtype] =>
[name] => Terms of Service
[slug] => /tos
)
)
)
)
)