Site:Frontend:Introduction
Contents |
Getting Started
Before you master creating websites within Metrixstream, you first need to know the basics, such as: the templating engine, how information is presented to the templating engine, default site settings, default page settings, system hooks to add custom code around actions, contexts available to pages, and methods for partitioning content and profiles.
Clearsilver
Clearsilver is a language neutral template processing engine based on the MVC (Model View Control) design pattern.
The idea behind it is that the backend does its magic, which results in an HDF object. This object is supposed to contain all the necessary information required to generate the website page that the user sees. This object is passed to the template processing engine, which you have control of. The template's responsibility is to reference the various information in the HDF, so that it can have the necessary context to generate the page.
Documentation of the Clearsilver language is available here: http://www.clearsilver.net/docs/
HDF Object
The HDF component is all of the relevant information necessary to create your page. It is a simple object composed of a list of key-value pairs. This usually consists of content titles, player urls, image urls, user information, etc. The job of the template is to reference the HDF keys, so you can output the HDF values.
Example
<?cs if:MS.site.user.loggedIn ?> Thank you for logging in, <?cs var:MS.site.user.username ?>. <?cs else ?> Please login! <?cs /if ?>
If you are unable to create the page you want, then you either aren't using the right context, or you need a custom extension to add additional fields to the HDF. Contact support@metrixstream.com for a quick consultation on how to accomplish what you want.
If you ever aren't sure what fields are available, add &hdf to the end of your site URL. It will output all the available HDF keys.