|
You are here: Home / Documentation / How To: XT Template Essentials |
How To: XT Template EssentialsBoxesEven better though, although it has less "woah" factor, is the ability to call Sitellite boxes in your XT templates. You've probably seen a few in the default Sitellite templates already:<xt:box name="sitellite/sidebar" position="left" /> Look familiar? What this does is, in one line of code, it inserts a fully functional sidebar mechanism into your template. The sidebar mechanism includes the ability to list multiple boxes of content vertically, and for administrators to add/edit/delete said boxes, as well as to sort their order of appearance on the page. Very handy stuff. In a box tag, the name, which is the only required attribute (the rest are all dependent on the parameters the box in question requires), refers to the name of the box, starting with the name of the app (see the inc/app folder for the list of available apps), and then with the path to the box itself. The additional attributes of the box call are passed to the box in an array called $parameters. So for example, in the above box call, the variable $parameters['position'] would contain the value "left". For more information about boxes, take a look at the Loader class in SAF. Next Up: I18n 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. |