Site:Frontend:Introduction

From Metrixstream
Revision as of 10:18, 1 October 2011 by MetrixAdmin (Talk | contribs)

Jump to: navigation, search

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.

Pages

Pages are the most basic requirement for building a site. A page consists of the HTML necessary to display your page. Pages have the ability to reference the template engine, but this is entirely optional.

Example: Create a "Hello World" page

  1. Create a new Site by clicking Add > Site and enter a site name.
  2. Click on the pages tab, click Add Page, and choose a name for your page.
  3. Enter the following HTML and click save.
<html>
<head>
 <title>This is an example page.</title>
</head>
<body>
  HELLO WORLD
</body>
</html>


Labels

Labels are the building blocks of organizing your content. Labels are a backend filter. They can not be specified in the URL. This makes them a secure filtering solution, because you can limit your site pages to content of a certain label and not worry about a user accessing content outside of that label.

You can add labels in batch or on a per content basis. Labels can be added in batch under the "bulk operations" widget on the "browse content" page. Labels can be added manually on an individual content item, by clicking on the "edit properties" link on the content page.

Tags

Tags are essentially public labels. Tags can be specified in the URL. Tags usually show up on content pages, so you can browse similiar content. The tagging system can be accomplished via the Category system, but it shouldn't because tags are considered a light weird mechanism you can create on the fly. Also keeping tags seperate from categories allow you to browse tags within a category.

You can add tags in batch or on a per content basis. Tags can be added in batch under the "bulk operations" widget on the "browse content" page. Tags can be added manually on an individual content item, by clicking on the "edit properties" link on the content page.

Categories

Categories are robust tags. The tagging system could be created under the category system by creating a root category called "Tag" and then creating sub-categories with the actual tag names. This is a cumbersom process, which is why the there is a seperate light weight tagging system. Categories also allow heirarchy support with as many levels as you want. Example: DVDS -> USA -> California -> Genre -> Action. Categories can be specified in the URL.

You have to first create categories on the category page. Once they are created, you can add them to the appropriate content.

You can add categories in batch or on a per content basis. Categories can be added in batch under the "bulk operations" widget on the "browse content" page. Categories can be added manually on an individual content item, by clicking on the "edit properties" link on the content page.

Associations

Associations are a term used to map content with accounts via a term. A common term would be "Cast". Videos normally have people in them, so you can associate the people with the videos via the "Cast" term. Other common associations are director, producer, writter, production company, etc.

You have to first create associations on the associations page. Once they are created, you can make associations with the appropriate content.

You can make associations in batch. Associations can be made in batch under the "bulk operations" widget on the "browse content" page.

Relationships

Relationships are a term used to map content with other content via a term. A common example is linking up scenes of a video into a DVD object, DVDs to a Box Set, etc. Relationships allow you to make this connection.

You have to first create relationships on the relationships page. Once they are created, you can make relationships with the appropriate content.

You can make relationships in batch. Relationships can be made in batch under the "bulk operations" widget on the "browse content" page.

Custom Fields

Custom fields allow you to store additional information on objects. This can be public information like eye color for accounts, or internal information like account type that is used with the faceted search mechanism.

Personal tools