|
You are here: Home / Documentation / How To: XT Template Essentials |
How To: XT Template EssentialsSubstitutions (Part 2)Now let's look at a few more ways of writing XT tags that will be substituted for data. Add the following to your template:<xt:tpl> When rendered in Sitellite, you will see a link that points to your web site. When previewed outside of it, of course, you will see a link pointing to the literal string "${site/url}". The ${} syntax allows you to specify paths inside attributes of any ordinary tag. An alternate way of specifying the same thing as the link above, without compromising previewability of the link, is as follows: <xt:tpl> The xt:attributes attribute essentially allows you to assign tag values to attribute names. Nothing fancy. A variation on the xt:replace attribute we saw above is the xt:content attribute, which only replaces the contents of the tag, not the whole tag itself, with the specified data. For example: <xt:tpl> This is handy in conjunction with conditions, as we'll see in the next part. Next Up: Conditions Page 1: Introduction |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |