Site:Frontend:Introduction

From Metrixstream
(Difference between revisions)
Jump to: navigation, search
(Created page with "== 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...")

Revision as of 17:27, 18 December 2010

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 aware of what information is available to you, 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.

Personal tools