CMS Editor for the White Label website - Tutorial    
This topic is assigned to Admin

--Admin--
Dec 10, 2013 11:44 AM

**NOTE: This option is available only for our publishers. Find out more about our White Label HERE. 

Get Started


  1. Go to Profile -> Publisher Dashboard -> CMS Editor
  2. NOTE** Enter user credentials created for testing purposes on your website and press Login

  3. Start editing.
img
There are two types of html files. Static html (icon) and templates (icon).
e.g. If you want to start using mypage.html as template:
  1. Right click on the Page List Area -> New -> File 
  2. Enter home as file name and choose 'Is template'
  3. Press 'Create'
This will create a template for mypage.html which can be used to add dynamic data. By accessing yourawesomesite.com/mypage.html it will load its template representation.
Note.
After creating a template for existing static icon filename, you should edit its template icon filename.
e.g.

There are 4 types of special tags used to render content in your Template.
Variables are used to insert dynamic data like your site title, description, etc.
Example
<html>
    <head>
        <title>{{Title}}</title>
    </head>
    <body>
        ...
    </body>
</html>
If your site tittle is 'My awesome site' it will output
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        ...
    </body>
</html>
Blocks are either used to render a block of HTML for a set of data (like payment information) or to conditionally show a block of HTML
Example
<html>
    <head>
        <title>{{Title}}</title>
    </head>
    <body>
        {{block:UserIsLogged}}
            Hello {{Username}}.
        {{/block:UserIsLogged}}
        {{block:UserIsNotLogged}}
            You need to be logged to view this page.
        {{/block:UserIsNotLogged}}
    </body>
</html>
If user is logged on your website as 'user88' the output will be
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        Hello user88.
    </body>
</html>
If user is not logged on your website the output will be
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        You need to be logged to view this page.
    </body>
</html>
Translation
Translation tags are used to translate your site in different languages. A translation tag looks like {{TT:category.key}}, It will search in your localization settings for the given key and insert it.
Example
In your localization settings:
index.helloLabel = Hello
general.shouldLoginInfo = You need to be logged to view this page.
<html>
    <head>
        <title>{{Title}}</title>
    </head>
    <body>
        {{block:UserIsLogged}}
            {{TT:index.helloLabel}} {{Username}}.
        {{/block:UserIsLogged}}
        {{block:UserIsNotLogged}}
            {{TT:general.shouldLoginInfo}}
        {{/block:UserIsNotLogged}}
    </body>
</html>
If user is logged on your website as 'user88' the output will be
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        Hello user88.
    </body>
</html>
If user is not logged on your website the output will be
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        You need to be logged to view this page.
    </body>
</html>
Partials
Partial tags are used to include other templates in the current document.
Partial tag looks like {{include:header}} and it will insert the code from header template.
Example
index template
<html>
    <head>
        {{include:head}}
    </head>
    <body>
        ...
    </body>
</html>
head template
<title>{{Title}}</title>
Will output
<html>
    <head>
        <title>My awesome site</title>
    </head>
    <body>
        ...
    </body>
</html>

Basic Variables


NameDescription
{{Title}}Site title
{{Hostname}}Hostname (ex. yourawesomesite.com)
{{ImageResourcePath}}Relative path to image folder (ex. yourawesomesite.com/img)

Basic Blocks


Block NameAvailable variablesDescription
{{block:UserIsLogged}}See here.Executed when a user is logged on your website
{{block:UserIsNotLogged}}N/AExecuted when the user is not logged on your website
{{block:UsersCollection}}See here.Iterates through all registered users
{{block:HasActivePlan}} N/A Executed when user has an active plan. Can be contained only in '{{block:UserIsLogged}}'
{{block:HasBasicSubscription}} N/A Executed when logged user has Basic Subscription. Can be contained only in '{{block:UserIsLogged}}' or '{{block:HasActivePlan}}'
{{block:HasPlusSubscription}} N/A Executed when logged user has Plus Subscription. Can be contained only in '{{block:UserIsLogged}}' or '{{block:HasActivePlan}}'
{{block:HasPremiumSubscription}} N/A Executed when logged user has Premium Subscription. Can be contained only in '{{block:UserIsLogged}}' or '{{block:HasActivePlan}}'
{{block:HasBusinessSubscription}} N/A Executed when logged user has Businesses Subscription. Can be contained only in '{{block:UserIsLogged}}' or '{{block:HasActivePlan}}'

Block Variables


{{block:UserIsLogged}}

NameDescription
{{Username}}Username for logged user.
{{Firstname}}First name for logged user.
{{Lastname}}Last name for logged user.
{{Email}}Email for logged user.

{{block:UsersCollection}}

NameDescription
{{Username}}Username of the current user.
{{Firstname}}First name of the current user.
{{Lastname}}Last name of the current user.
{{Email}}Email of the current user.

    1