Documentation Home

Features

What is unroole?

unroole is a cloud web development platform. The goal of unroole is to allow front-end developers to create and maintain hundreds of websites without the need for back-end or ops. unroole tries to eliminate and simplify the tedious and redundant tasks involved in creating and maintaining web apps and properties while moving the entire web development workflow to the cloud.

The Cloud

One major advantage of being in the cloud, is that you do not have to worry about scaling as the demand grows. Infrastructure is taken care of out of sight and dynamically, allowing teams to focus building websites.

Multi-Tenancy

Traditionally, different web-properties required their own instances / setups. Updating and maintaining these instances has been an exponential drain on teams as their portfolios grew. unroole has the capability to have thousands of websites as Channels, in hundreds of Accounts, all maintained from (but not limited to) a single login.

Shared Content

unroole has a unique approach to content. Much of unroole's content is shared across all channels within an account. This allows for the content to be maintained in one place but used in as many websites as that client requires.

A powerful paradigm of unroole is complete separation of look and feel, structure and content. This allows for content creators to work independently of developers or user experience people.

Scheduling & Versioning

Versioning is handled in the cloud using scheduling, so you never have to work on a live site. Different versions of page can be created and scheduled individually to automatically go live. “Set and forget” allows you to work on things long before they should go live. The same scheduling capability is available to many things in unroole including articles, layouts and themes.

Customizable Widgets

Developers have the ability to create blocks of code with advanced functionality that can be easily used by page creators without any knowledge of code. The options available to end users is defined during widget creation allowing developers to give users exactly the amount of control they need without a steep learning curve.

Time Preview

unroole allows for scheduling of content. To be able to view what your website will look like in the future (or even in the past), you can use the Time Preview. To access time preview click on “Scheduling” in the sidebar Advanced panel. Time Previews are password protected and are set to expire, so sending links to clients is secure.

Compatible Frameworks

unroole is a platform for web development. We try to stay framework agnostic, allowing developers to use whatever frameworks get the job done. Adding frameworks is as easy as uploading them to your theme, and defining the load order.

Core Concepts

What is an account?

Accounts are grouping together several websites (channels) you want to create and administer. Accounts share content amongst all their channels. For example, an Account can have a website, a separate mobile website, and a Facebook Page. Uploading assets to the account will make them available to all of these different channels. Modifying that asset will modify it across all channels. Updating an article will update that particular article for all sites using this article.

What is a channel?

Channel represents a single website. Adding content to a channel will make it available to all the other channels in the same account.

What is a theme?

A theme is a collection of files that affect how your website is displayed. Usually this collection contains CSS files and Javascript files to tell unroole how to format your website. Because websites in unroole aren’t forced to a rigid structure, themes also contain blueprints which suggest the structure intended for a particular theme. Themes have a queue, and multiple themes can be scheduled but only one will be active at any given time.

What is a theme queue?

As a part of the unrooles core scheduling concept you can schedule different themes to be applied to your website at any point in the future. On the theme page in the unroole core you have a theme queue with all your themes scheduled dates. This feature enables you to set different themes to switch automatically on a specific date.

What is a Layout?

Layout is a part of the theme which contains all the pieces of code and content that are repeated on every page of the website. Usually these pieces are in the header and footer parts of the website. Also, in layouts are all the code snippets creating , and tags.

What is a Layout Queue?

Same as with theme queue, you can schedule different layouts to be applied to the website in certain point in the future. To preview layout queue, click on “Layouts” in the Appearance tab in sidebar.

What is a Page?

Page represents a single page of the website and usually is comprised of the content that comes between header and footer sections of the website. Pages encompass all the content you want to display on the website, and they are used to create navigations of the website. They can include article collections, galleries, sidebars, and anything else you want to present on your website. Pages are built with widgets.

What is a Widget?

Widgets are building blocks of websites created with unroole. Think of them as lego blocks - you use different sized and shaped blocks (each widget can be filled with different content) and connect them with other blocks (each widget can be placed wherever the content should be displayed). Widgets are used inside page and layout editor to actually build these parts of the website. There is a set of system widgets that are available to every theme in the unroole. These widgets are retreiving all content and data added to your website, ie. they can display articles based on selected category or type, assets such as images or videos, etc. When creating a widget developer has a total control over how data retrieved will be formatted and where will it appear and how it will be styled, as raw data is being exposed to widgets.

What is an Asset?

Assets are all media files and documents you can upload to a channel and share with other channels in the same account. Assets can be any format of an image, video or a document. All assets can be tagged and searched by assigned tags.

What is an Article?

Articles are commonly used as blog posts. They are pieces of written content which you can add to different categories, types and to which you can apply tags. With rich editing features text can be formatted any way you like. Also you can add assets to your articles.

What is a Blueprint?

Blueprints in unroole are used to make creation easier. Instead of creating something from scratch every time, you can save it as a blueprint, then make copies based on that blueprint.

What is the Theme Editor?

Theme editor is unrooles IDE for creating, editing and deleting theme files, which include widget blueprints, layout blueprints and page blueprints as well as css and javascript files. In Theme editor you can also determine the load order of your scripts and styles, and add frameworks you wish to use.

What is the Page / Layout Editor?

Page and layout editors are used to add content to pages and layouts. In unroole all content is added with widgets, so the process of creating pages and layouts is basically selecting the widgets, choosing some options and dragging them to the right position.

General Workflow

Getting to a Channel

To access a desired channel you click on the “Channel” in the sidebar. A slide out will show all your channels across all your accounts. If you haven’t created any channels yet, here is where you create one.

Upload assets and create articles

First you’ld want to add some content to the unroole. Assets are all the media and documents you can upload to your website. Articles, are as the name suggests, pieces of written content which you can categorize and assign different types to.

Create a page

You can create pages by accessing pages from your sidebar. By setting a schedule date, you are determining when will page be live on the site. Once created, they can be edited in the page editor. In the page editor configure and add widgets to populate the page with the content. Pages can also be created from blueprints to speed up your workflow.

Create a navigation

To create a navigation click on “Navigation” in the sidebar content panel. Create a new navigation and add your pages as navigation items.

Create a Layout

Layouts hold the content of the website that shows up on every page on your website, usually header and footer sections. You can create one by accessing Layouts from the sidebar. Once created they can be edited in the Layout Editor. In Layout editor you can configure all the widgets that control the content of the header and footer, like add navigations, select the logo image, etc.

Preview website

When you get back to the unroole core, you can preview the website by clicking top right “Preview website” button.

Intro to Blueprints

Blueprints in unroole are used to make creation easier. Instead of creating something from scratch every time, you can save something as a blueprint, then make copies based on that blueprint. Themes in unroole, don’t just contain styling and scripts, instead they hold Blueprints for pages, layouts and widgets so that someone using the theme can quickly create these things as the author intended. Layouts are used to wrap pages. Shared elements between pages such as the navigation, are commonly put in the layout blueprint. Widgets that repeat across pages are commonly added to the page blueprint so that they don’t have to be added manually each time a page is created.

Where can I access blueprints?

One place to access blueprints is in your account or channel. To access all your blueprints click on “Blueprints” in Advanced tab of the sidebar. The second place you can find blueprints is in your theme. Pages and layouts only exist in the unroole core, but the blueprints to create them from can be stored in each theme.

Creating Blueprints

Creating blueprints (except Widget blueprints) is identical to creating the real thing without many of the options required.

In unroole core

To create a blueprint, first access your account or channel. Click on “Blueprints” in the Advanced panel in the sidebar. Here you can see all of your blueprints. We can use the action buttons at the top of the page to create a specific blueprint. When creating a CSS or Javascript blueprint, just click the appropriate action button, fill out the information and click “Create”. When creating a page blueprint or layout blueprint, click the appropriate action button, fill out the information and click “Create”. To add content to the page or layout access their respective editors by clicking ‘Launch editor’ icon next to their name in the table. To use a blueprint to create something, click on edit in it’s table row. There is now an action button at the top of the page called “Clone”. Click this to create something using this blueprint.

In the Theme Editor

In the theme editor, to create a blueprint, click on “New” action button located at the bottom of the file tree. Select the type of blueprint you would like to create. To edit your page blueprint or layout blueprint, select it in the file tree and click “Page Editor” or “Layout Editor” in the top right corner of the screen. You can also edit them manually in the theme editor but this is not recommended for novice users as the wrong syntax could invalidate your blueprint and prevent you from editing it in the page or layouteditor. To edit a widget blueprint, simply select it from the file tree.

Creating from Blueprints

Pages

  • To create a page from a page blueprint, click on “Blueprints” in Advanced tab in sidebar.
  • Click on the “Page Blueprints” tab
  • Click the action (right side of table) called “Create Page from this Blueprint”
  • Fill in the fields, and choose level where the page will be accessible, channel or account
  • Click “Create”

Layouts

  • To create a layout from a layout blueprint, click on “Blueprints” in Advanced tab in sidebar
  • Click on the “Layout Blueprints” tab
  • Click the action (right side of table) called “Create Layout from this Blueprint”
  • Fill in the fields, and choose level where the layout will be accessible, channel or account
  • Click “Create”

Widget Blueprints

Widget Blueprints are at the heart of creating websites in unroole. They are covered in detail here.

Themes

What is a Theme?

A Theme is a collection of files that affect how your website is displayed. Usually this collection contains CSS files and Javascript files to tell unroole how to format your website. Because websites in unroole aren’t forced to a rigid structure, themes also contain blueprints which suggest the structure intended for a particular theme. Themes have a queue, and multiple themes can be scheduled but only one will be active at any given time.

What is inside?

There are two ways to look inside a theme. One is to go to Themes in unroole, and download the Theme you would like to inspect. The download is a .zip file and should be extracted to view contents. The other way to see what is inside a Theme is to edit it using the Theme Editor.

Frameworks

The frameworks folder contains any front-end frameworks that you upload. Frameworks should be uploaded as .zip files. Their contents are visible when you select the framework from the sidebar in theme editor. Before a framework can do what is it supposed to, the right files need to be ordered inside the properties.xml file described below.

Layout Blueprints

A layout wraps pages and is intended to hold the common elements on all pages of your website, such as the navigation and footer. Layouts can be created in the theme editor, and edited using the layout editor. Layout blueprints can be turned into a layout by selecting the blueprint, clicking the “Item Options” action button, then choosing “Export To Admin”. When complete, a layout based on that blueprint will be available in the unroole core.

Page Blueprints

Page Blueprints are not real pages. They are blueprints, used to quickly build pages with a structure that the Theme designer intended. They can be viewed and edited but must be exported to unroole to be used in a website. To use a blueprint to create a page you first need to export it to admin. Select the blueprint, click “Item Options” action button at the bottom of the file tree, then click “Export to Admin”.

Widget Blueprints

Widgets are code blocks used to build pages. Widget Blueprints are used to create Widgets which are central to any theme. If a user has a particular Theme selected when building pages and layouts, all the widget blueprints belonging to that theme are available to chose from.

Javascript & CSS

Javascripts & CSS files are exactly what they sound like. They are just files containing either Javascript or CSS. The load order of these files is decided in the properties.xml file described below.

Assets

Assets folder contains images used by the theme. Hovering over an asset in the theme editor should give you a preview of that asset in the lower right corner. Selecting an asset will show it in your work area.

properties.xml

This file is responsible for the load order of files in your theme. When defining this load order, please omit file extensions. If you would like to add a Javascript file to the load order, add the entry file-and-path-w-no-extension to the section.

Creating a Theme

To create a Theme, first you must decide whether this Theme should be available only to a specific Channel, or if said Theme would be applied to multiple Channels of an Account. In either case, you must go the the appropriate level. Click on “Themes” in the Appearance panel in the sidebar. Depending on which level you are in, the action at the top of the page should let you “Create Account Theme” or “Create Channel Theme”. Click the action.

Name your theme and add an optional description. Click “Create”. You should see your Theme in your Theme table. If you are on a Channel, tabs separate your Channel Themes from your Account Themes. To the right of your table row, click the “Go to Theme Editor” button to begin editing your theme.

Modifying the contents of your Theme

Click “Themes” in Appearance tab in sidebar. Find the theme you want to edit in the Theme table. To the right of each row are the action icons. Clicking “Edit” will let you rename your Theme and change the description. Clicking “Go to Theme Editor” will launch the Theme Editor and allow you to modify the content of your Theme.  

What is the Theme Editor?

The Theme Editor is unroole’s cloud IDE for editing theme content. Themes can be downloaded for offline work, but you do not have access to the Layout / Page Editor so all Blueprints have to be coded manually. To launch the Theme Editor, click “Themes” in Appearance tab in sidebar. Find your Theme and click “Go To Theme Editor” action to the right of each row.

Theme Editor Interface

The Theme Editor is unroole’s cloud IDE for Theme development. The Theme Editor is accessible by editing any theme in unroole.

The button with the unroole logo {un} in the top left corner will take you back to unroole core. The sidebar contains all the files of your theme organized by their respective types.

Below the sidebar are the action buttons for creation and manipulation of files within the theme. The right part of the screen is used to display your editor, assets being previewed or contents of your frameworks.

Log

The log is used to display system messages such as errors or successes. The log is located at the very bottom of the screen. It can be expanded and collapsed by clicking on the icon in the bottom right corner.

Creating and Editing

The creation and editing of files in a theme takes place in both the theme editor and the layouteditor. This article focuses on the part done in the theme editor.

Frameworks

Frameworks cannot be created or edited in unroole. They are external libraries which can be uploaded to a theme.

  • To upload a framework, go to the theme editor
  • Click “Upload” action button in the bottom of the file tree and choose “Framework” from the options
  • Browse for the .zip file of the framework in question
  • Click “Upload”

The framework should appear under your frameworks section in the file tree. Selecting the framework will show a list of its contents. To set the right load order of your framework files please refer to properties.xml documentation.

Layout Blueprints

Layout blueprints are created in the theme editor. They could be edited manually in the theme editor or visually in the layout/page editor.

  • To create a layout blueprint, go to the theme editor
  • Click “New” action button at the bottom of file tree and choose “Layout Blueprint” from the options.
  • Type the name of your layout blueprint and click “Create”

Your Blueprint should appear under Layout Blueprints section in the file tree. Selecting the blueprint will display it’s contents in raw code. You may edit the Blueprint manually (not recommended for novice users) or click “Layout Editor” button in the top right corner of the screen, to edit it in the Layout Editor.

Layouts blueprints can also be created from existing blueprints in the unroole core by clicking the “Create From” action instead of “New”, selecting “Layout Blueprint”, then choosing a layout blueprint to copy.

Page Blueprints

Page Blueprints are created in the theme editor. They could be edited manually in the theme editor or visually in the layout / page editor.

  • To create a page blueprint, go to the theme editor
  • Click “New” action button in the bottom of the file tree and choose “Page Blueprint” from the options.
  • Type the name of your page blueprint and click “Create”

Your blueprint should appear under Page Blueprints section in the file tree. Selecting the Blueprint will display it’s contents in raw code. You may edit the Blueprint manually (not recommended for novice users) or click on the “Page Editor” button in the top right corner of the screen, to edit it in the Page Editor. Make sure you select a layout to wrap your page before launching the page editor, to see them working together.

Page Blueprints can also be created from existing blueprints in the unroole Core by clicking the “Create From” action instead of “New”, selecting “Page Blueprint”, then choosing a page blueprint to copy.

Widget Blueprints

To have a widget blueprint in your theme you can either create a new one or create from an existing one in the unroole Core.

Create:

  • To create a widget blueprint, go to the theme editor
  • Click “New” action button and choose “Widget Blueprint” from the options.
  • Type the name of your widget blueprint and click “Create”

Create From:

  • To copy a widget blueprint to your theme, go to the theme editor
  • Click “Create From” action button and choose “Widget Blueprint” from the options.
  • Find the item you would like to create from and click the little blue icon to the right of each row.

Once your Widget is created, it can be found under the “Widget Blueprints” section in your sidebar. Simply select to edit it. For more information on building Widgets click here.

Javascript & CSS

Javascripts & CSS files in the Theme Editor can be created, copied from the unroole Core or uploaded.

Create:

  • To create a script or stylesheet to your theme, go to the theme editor
  • Click “New” action button in the bottom of the file tree and choose “CSS” or “Javascript” from the options.
  • Name your file without an extension and click “Create”.

Create From:

  • To copy a script or stylesheet to your theme, go to the theme editor
  • Click “Create From” action button at the bottom of the file tree and choose “CSS” or “Javascript” from the options.
  • Find the item you would like to create from and click the little blue icon to the right of each row.

Upload:

  • To upload a script or stylesheet to your theme, go to the theme editor
  • Click “Upload” action button at the bottom of the file tree and choose “CSS” or “Javascript” from the options.
  • Browse for the file you would like, then click “Upload”.

Once your file has been created, simply select it to edit it in the theme editor. Saving happens in the background every few seconds but you may explicitly save with cmnd / ctrl + S.

Assets

Assets (images) in the Theme Editor can be uploaded, or duplicated from an asset already in the unroole Core.

  • To upload an asset to your theme, go to the theme editor
  • Click “Upload” action button in the bottom of the file tree and choose “Asset” from the options.
  • Browse for the image you want, then click “Upload”.

A similar workflow will let you copy an asset into the theme from the existing assets in unroole Core.

  • To copy an asset to your theme, go to the theme editor
  • Click on the “Create From” action in the bottom of the file tree and choose “Asset” from the options.
  • Find the asset you would like, then click the little blue icon to the right of each row.

Your Assets should now be visible in the file tree under the expanded Assets section.

properties.xml

You cannot create this file. It is required in all Themes. To edit, simply select it. For more information click here.

Exporting

Some files that you create in your theme, you might want to keep outside of it, so that they can be used regardless of the theme in queue. The theme editor allows you to export these files directly to the unroole Core.

  • To export a file to the core, select it from the theme editor sidebar.
  • Click “Item Options” action button at the bottom of the file tree
  • Click “Export to Admin”

The exported files can be found in their respective sections in the unroole Core.

Additional Actions

All files, with the exception of properties.xml, can be renamed or deleted from your theme in the theme editor.

Renaming

  • To rename a file, select it from the file tree
  • Click on the “Item Options” action button at the bottom of the file tree
  • Click “Rename”
  • Type in the new name without the file extension and click “Rename”

Deleting

  • To delete a file from your theme, select it from the file tree
  • Click “Item Options” action button at the bottom of the file tree
  • Click “Delete”

Customizing Your Load Order

The load order of files in your theme is dictated by the properties.xml file. File extensions are not used. Creating a Javascript or CSS file should add an entry to the properties.xml automatically with the format:

<file>filename_no_extension</file>

To assign where Javascripts from your channel should load, add the following to the <javascripts></javascripts> section:

<file>:channel-javascripts</file>

To assign where CSS from your channel should load, add the following to the <stylesheets></stylesheets> section:

<file>:channel-stylesheets</file>

To add a file from a framework to the load order add the following to the appropriate section:

<file>:frameworks/name-of-framework/path-of-file/file-name-no-extension</file>

What is the Layout / Page Editor?

The Layout / Page Editor is unroole’s cloud WYSIWYG editor where you use widgets to structure Pages and Layouts.

Layout / Page Editor Interface

The Layout Editor is unroole’s WYSIWYG editor for pages and layouts. The Layout Editor is accessible by editing any page, layoutpage blueprint or layout blueprint.

Top Bar

The button in the top left corner with the unroole logo {u} will take you back to unroole Core. In the top right corner you have the following options:

  • Dropdown to select one of the themes in your channel and preview it with the current layout
  • Toggle to remove the boundary layers in the preview window, so you can easily inspect elements in the preview
  • “View Website” button will open a separate tab with the preview of what you are working on.

Preview window

The main area of the editor is live preview of the current state of your page/layout

Bottom tray

In the left box there is a widget tree of all the widgets currently added to your page/layout. At the bottom are action buttons for adding and removing widgets. When you click on a widget in a tree, in the right area you will see all the options available for that particular widget. If you click “Add” action button here you will see all widgets available to you, divided in three sections:

  • System Widgets
  • Theme Widgets
  • Custom Widgets

To remove the widget from the tree, select it and click “Delete” action button

Widgets with a little arrow can be expanded and other widgets can be placed inside.

Log

The log is located at the very bottom of the screen. It can be expanded and collapsed by clicking on the icon in the bottom right corner.

Building your Layout / Page Structure

To build a layout, layout blueprint, page or page blueprint you will need to launch the layout/page editor. To do this from the theme editor, simply select the layout or page blueprint, then click the blue button in the top right corner of the screen called “Layout Editor” or “Page Editor”. To launch the editor from the unroole Core, go to your Pages or Layouts and click the action button on the far right of a row called “Go To Layout Editor” or “Go To Page Editor”.

The Role of Widgets

Widgets are the building blocks of any page or layout. In the layout/page editor, they can be created from blueprints, configured, and moved into their desired hierarchy.

Creating widgets from blueprints

To place a widget on a page, it must be created from a blueprint. To do this in the editor, click “New”, located in the bottom left corner of the editor. Notice that whatever was selected last in your Widget Tree is now green. This lets you know that the new widget will be placed inside the selected widget (if possible) or created right below the selected widget.

To the right, we can see a panel of all widget blueprints available to you. System widgets are blueprints available by default in unroole, anytime you want to create a widget. Custom widgets contain blueprints created in the unroole Core and are available regardless of theme in use. Theme widgets are blueprints provided by your theme. Choosing a different theme will show different blueprints available here.

To create a widget simply click on the Blueprint from the list. It will be placed in your Widget Tree. Selecting it will display its options.

Using the Widget Tree

Selecting any item in the widget tree will display its options in the details panel to the right. Clicking it again will deselect. Each “structured” widget, which allows for other widgets to be nested inside, has a little arrow on the left side. Clicking this arrow toggles between showing and hiding its contents. When this arrow is black, the Widget is empty but it can accept nested Widgets.

To change the order or nesting of your widgets, simply drag and drop to the desired location in the tree. Widgets that have children will be moved with all their children when dragged.

When creating a new widget, selecting a widget will determine where the new creation will be placed. If the selected Widget is structured, the new one will be created inside. If it is not structured, the new one will be placed below it.

Updating Widgets from Blueprints

N/A

Layouts

Looking at a new layout in the layout editor, we can see that there are widgets in the layout already. These are created by default to represent the basic structure of a web page. More details can be found here.

One Widget of particular importance is the “Page Content” Widget. This Widget marks where pages are going to be injected in this layout.

Pages

Pages are wrapped in a layout and cannot display on their own. For this reason, all the required components such as or are taken care of by the layout.

One unique thing about pages, is that if you place a header widget on a page, the code inside the header widget will be appended to the actual header when the website is rendered.

Editing Widget Attributes

To edit the options on a widget, simply select it for the widget tree. All its properties and settings will be available in the details panel.

Details Panel

Here you can edit the properties available to each widget. Certain panels such as the code can be maximized for a better workflow by clicking the little arrows in the top right corner of the panel. The same button is used to return to your normal view. To save your changes click “Save” in the top right corner of the panel.

Instructions for Widgets

N/A

Updating Widgets from Blueprints

N/A

Previewing Your Changes

The layout/page editor is a WYSIWYG editor. This means that your changes can be viewed instantly. Clicking on different things in the preview area will select their widget. To disable this selection, in order to inspect your page, click the little black toggle in the top right corner of the Editor. You can also hide the bottom panel to get more real-estate by clicking the little arrow in the top right corner of the details panel.

To preview your work in a separate tab, click the blue button in the top right corner of the editor.

Widgets

What are widgets and how are they used?

Widgets are building blocks of websites created with unroole. Think of them as lego blocks - you use different sized and shaped blocks (each widget can be filled with different content) and connect them with other blocks (each widget can be placed wherever the content should be displayed). Widgets are used inside page/layout editor to actually build these parts of the website. To add a widget to a page, you go to the page editor, in the bottom tray in the main area you have all the widgets blueprints available to you divided in sections, system widgets blueprints, custom widgets blueprints and theme widgets blueprints. On the left side of the tray you have the tree structure of the widgets added to the page. If a widget is structured, meaning that it is designed to contain nested widgets, it has a little arrow on its left side which is used to toggle all the nested widgets added.

  • To add a new widget to a page, click ‘New’ action button at the bottom of the widget tree.
  • Select a widget blueprint you want to add
  • In the main area of the tray you will have specific options for each widget blueprint
  • In order to rearange the order of added widgets or to add them to structured widgets just drag and drop them in the widgets tree in the left part of the tray

System widgets are included in every unroole website and they provide data available for each piece of content created and each part of the HTML document rendered. Most commonly you will use this data to build your own widgets by referencing liquid tags these widget blueprints use. Building your own widget blueprints is quite a simple process. In plain words, each widget blueprint represents one section of the website, and you use plain html and liquid tags to display the data you want in the form you want. For detailed instructions on how to create a widget read Creating a new widget

Using and configuring widgets

Widgets are the building blocks of any page or layout. In the layout/page editor, they can be created from Blueprints, configured, and moved into their desired hierarchy. There are three categories of widget blueprints.

  • System widgets are blueprints available by default in unroole, anytime you want to create a widget.
  • Custom widgets contain blueprints created in the unroole Core and are available regardless of theme.
  • Theme widgets are blueprints provided by your theme. Choosing a different theme will show different blueprints available here.

To include a widget to your page or layout go to page or layout editor. In the bottom tray in the left box there is a tree of widgets added to the page/layout. As some widgets are configured to accept nested widgets, all their children widgets are indented below them. By clicking an arrow next to the parent widget you can collapse and expand nested widgets. To rearrange order of the widget simply click and drag them to the desired position. Same goes with the placing and removing child widgets in/from their parents.

If you click on each widget in the tree, in main panel you will see various options and inputs you can make on that particular widget. To add a new widget to the page/layout click “New” action button at the bottom of the widgets tree. In the main panel you will see all the widgets available divided by sections described above. Click on the desired widget and in the main panel you will be presented with the set of options and inputs you can fill in. After you are done, click on “Save changes” button in the upper left corner of the tray and your changes will be visible in the preview window above it. Options you will have at your disposal depend on the widget you use, but most of them will have same functionality as system widgets, and here you can view all the options these widgets are providing.

To remove a widget, click on it in the widget tree and click “Delete” action button at the bottom of the widget tree.

What are System widgets and how are they used?

System widget are included by default in all unroole themes and they can be accessed either in layout/page editor or in “System widgets” panel on the widgets page in the Uroole Core. System widgets are used to fetch all the data stored for all the content added to the account or channel, such as articles, navigations, assets, etc., based on several criteria depending on the widget in use. Besides that, they are used to build all the elements of the page such as <html>,<head> and <body> tags.

For the full list of system widgets read List of system widgets, and for detailed data returned by each widget read unroole accessible data

List of system widgets

Article Collection

Article collection returns a collection of articles based on several criteria:

  • Category/categories of articles that should be included in the collection
  • Type/types of the articles that should be included in the collection
  • Number of articles to show per page
  • Results page - which page should be used to display the single article once the visitor clicks on the link. This page should contain article single result widget in it.

To view all the data you can access with this widget, read article collection widget data.

Article single exact

Article single exact returns a single article which is selected in the widget itself. It is mostly used if you would like to pin a certain article in a specific place in your theme or website.

Criteria you can set in this widget are:

  • Category of the article
  • Type of the article
  • Article to display
  • Results page - which page should be used to display the single article once the visitor clicks on the link. This page should contain article single result widget in it.

To view all the data you can access with this widget, read article widget data.

Article single result

Article single result is a widget commonly used in pages that display results of article collection and article single exact widgets. There are no preferences to set up for this widget as it only access the properties of an article object based on the ID of an article passed in the url.

To view all the data you can access with this widget, read article result widget data.

Asset

Asset widget is used to display a single Asset uploaded to the account or channel. As assets can be images, documents, PDFs, icons, YouTube videos, etc. the widget is preconfigured to render each of these in appropriate format.

To view all the data you can access with this widget, read asset widget data.

Asset image

Asset image is very similar in structure to above mentioned Asset widget. The only difference is that it is only possible to select assets that are images.

To view all the data you can access with this widget, read asset image widget data

Code

Code widget is used to add code snippets to your page/layout/widget. You can select from: text, javascript, json, css or html. The widget will take care of formatting for each of the selections as well as provide some simple syntax highlighting.

Container (Box)

Container (Box) is a widget that renders a div for which you can set id, class or any other additional attribute. This is a structured widget, which means that other widgets can be placed (nested) inside the widget. This widget is commonly used to create different sections on the page.

Gallery

Gallery widget is used to select and display a gallery you have created in the unroole Core. Besides selecting the gallery you wish to display, you can set html attributes to the gallery’s wrapping div: class, id or any other attribute. By default images within the gallery are displayed inside ul tag. To view all the data you can access with this widget, read Gallery widget data.

HTML Body

HTML Body is a widget commonly used in layouts and it renders the tag. It is a structured widget, which means that other widgets can be placed (nested) inside the widget.

HTML Document

HTML Document is a widget commonly used in layouts and it renders the tag. It is a structured widget, which means that other widgets can be placed (nested) inside the widget.

HTML Header

HTML Header is a widget commonly used in layouts and it renders the tag. It is a structured widget, which means that other widgets can be placed (nested) inside the widget. Most commonly this widget is used to add additional resources and meta tags by nesting a Code widget.

Navigation

Navigation widget is used to display one of the navigations created in the unroole Core. Besides selecting the navigation you would like to use, you can set class, id or any other attribute to the ultag that is generated by the widget. To view all the data you can access with this widget, read navigation widget data.

Page Content

Page Content is a widget commonly used in layouts, and denotes where page content should be rendered. This widget is sort of a placeholder telling unroole where to render the actual page. In most cases this widget is placed in the Layout, between the header and footer parts.

Text

Text widget is used to display text. You can set class, id or any other attribute to the p tag that will wrap the text. Text editor supports paragraphs, unordered and ordered lists, text styles (bold and italic), horizontal lines, assets, text aligns, links, tables and horizontal rule.

Creating a new widget blueprint

To build our own widget blueprint, we will combine our own html structure with the data provided to us by liqud tags and filters.

Building a widget blueprint is very simple, you basically reference different objects and their properties and place them in the html structure of your liking. Let’s see how this works in an example widget blueprint. Below is a real-world example of a widget blueprint that displays a list of articles:

<section class="container articles-list">
    {% for a in article_collection.items %}
        <article class="article-container">
            <h2 class="article-title"><a href="{{a.link}}" title="{{a.title}}">{{a.title}}</a></h2>
            {% if a.featured_image %}
                <div class="thumb-container">
                    <img src="{{a.featured_image.sizes.original.url}}" alt="{{a.featured_image.name}}" />
                </div>
            {% endif %}
            <div class="article-header">
                <p class="small">Published: {{a.published_on | date: "%b %d"}} <span class="divider">|</span>By: {{a.author.first_name}} {{a.author.last_name}}</p>
            </div>
            <div class="article-excerpt">
                <p>{{a.body | truncate : 300}}</p>
                <a class="read-more" href="{{a.link}}">Read more</a>
            </div>
        </article>
    {% endfor %}
    <div class="pagination">
        {% if article_collection.paginate.total_pages > 1 %}
            {% if article_collection.paginate.previous %}
                <a class="prev-btn" href="{{article_collection.paginate.previous_url}}"> Previous </a>
            {% endif %}
            {{article_collection.paginate.current}} / {{article_collection.paginate.total_pages}}
            {% if article_collection.paginate.next %}
                <a class="next-btn" href="{{article_collection.paginate.next_url}}"> Next </a>
            {% endif %}
        {% endif %}
    </div>
</section>

Let’s analyse the code line by line and see how html and liquid tags are working together.

First we wrap the widget in the section tag and apply container articles-list classes to it. This structure and class names are entirely provisional, and you can use any structure fit for your design.

Next we have a liquid for loop, opening tag {% for a in article_collection.items %}, and closing tag {% endfor %}. To understand what this loop does, let’s take a look at the article_collection object we are referencing here. This object is provided by unroole in form of a liquid tag, and just by referencing it in our widget we have access to all of its properties.

article_collection = {
    items: array[article_object],
    paginate: {
        previous: int,
        previous_url: string,
        next: int,
        next_url: string,
        current_page: int,
        total_pages: int,
        per_page: int,
        total_items: int
    }
}

As you can see, in our for loop we have referenced the article_collection.items property, which is an array of article objects, and we are telling widget to execute the block of code in between {% for a in article_collection.items %} and {% endfor %} for each object we have stored in article_collection.items property. Properties referenced in this block of code belong to single article object. If we inspect the article object we will see all the properties we used to build the content of our article container:

article = {
    id: int,
    title: string,
    featured: boolean,
    activates_at: date,
    published_on: date,
    updated_at: date,
    body: string,
    link: string (URL), 
    author: {
        first_name: string,
        last_name: string
    },
    category: {
        id: int,
        name: string,
        description: string,
        urlized_name: string,
        updated_at: date
    },
    type: {
        id: int,
        name: string,
        urlized_name: string,
        updated_at: date
    },
    featured_image: object
}

First we wrap an article in article tag and apply article-container class to it. Next, we build a title and link to the entire article. As per liquid syntax, whenever we are accessing object properties we need to enclose it in double curly brackets, so to build a url of each article we use {{a.link}} and for title {{a.title}}. Again, these are the properties of article object above. Next we want to display the featured image of the article and a .thumb-container surrounding it, but only if the image is assigned to the article. For this flow control we use liquids if statement with opening {% if a.featured_image %} and closing {% endif %} tag. This is telling our widget to only display the block of code in between these two if a condition is met. Our condition here is if article’s property featured_image has image object stored or not. If you inspect our article object above, you will see that featured_image property is an object, and that object is provided to us by asset image liquid tag, and object that is stored has the following structure:

asset_image = {
    id: int,
    name: string,
    description: string,
    updated_at: date,
    tags: array,
    sizes: {
        original: {
            url: string,
            type: string,
            file_format: string,
        },   
        thumb: {
            url: string,
            type: string,
            file_format: string,
        },
        icon: {
            url: string,
            type: string,
            file_format: string,
        }
    }
}

So, to build an actual link to the image in src attribute of the img tag we are using {{a.featured_image.sizes.original.url}}. Let’s break it down a bit to see exactly from where our data is coming:

  • a - this is our article object in the for loop
  • featured_image - this is a property of the article in the loop
  • sizes - this is property of image object stored inside featured_image
  • original - this is object inside sizes property, which stores all the data of the image in the original size. Besides original we have thumb and icon available
  • url - this is the url string of the image in the original size

After featured image sorted out in our widget blueprint, next we want to display the author and published date:

<div class="article-header">
    <p class="small">Published: {{a.published_on | date: "%b %d"}} <span class="divider">|</span>By: {{a.author.first_name}} {{a.author.last_name}}</p>
</div>

By now this should be pretty straight forward, we are referencing articles published_on and author properties. author property has two strings stored within, first_name and last_name. Authors’ name is broken down in two strings so we would give programmers and designers total control over how the data is displayed. You may want to apply different classes to the first and last name, or to display just one or the other.

What is new here is how we are displaying the published date, {{a.published_on | date: "%b %d"}}. We used a liquid filter date to format the string retrieved with a.published_on. Format in which dates and times are stored with the unroole is yyyy-mm-dd T hh:mm:ss.sss -timezone, and if we omitted the filter and just used {{a.published_on}} the resulting string would be in the default format, which is not usable in this particular situation. Parameters %b %d will produce the following format of the date: Jan 04. Full list of date liquid filters can be found here.

Next block of code is displaying our article content and read more link:

<div class="article-excerpt">
    <p>{{a.body | truncate : 300}}</p>
    <a class=”read-more” href=”{{a.link}}”>Read more</a>
</div>

First we are referencing the body property of article in the for loop. body property stores the actual content of the article. We are also applying filter to it, truncate, which is used to display only certain number of characters in a string. Here we passed 300, so in this place only first 300 characters will be displayed. Read more link is built the same way our title link was built, we used articles link property inside the href attribute.

With this block we finished or for loop and each article will be displayed following this structure.

Next we have a block of code that will build our pagination on the page where the widget will be used:

<div class="pagination">
    {% if article_collection.paginate.total_pages > 1 %}
        {% if article_collection.paginate.previous %}
            <a class="prev-btn" href="{{article_collection.paginate.previous_url}}"> Previous </a>
        {% endif %}
        {{article_collection.paginate.current}} / {{article_collection.paginate.total_pages}}
        {% if article_collection.paginate.next %}
            <a class="next-btn" href="{{article_collection.paginate.next_url}}"> Next </a>
        {% endif %}
    {% endif %}
</div>

Here, we are only referencing paginate and its nested properties of article_collection object and we are using if statements to control whether to display the next and previous links. Let’s see this object once again:

article_collection = {
    items: array[article_object],
    paginate: {
        previous: int,
        previous_url: string,
        next: int,
        next_url: string,
        current_page: int,
        total_pages: int,
        per_page: int,
        total_items: int
    }
}

Inside paginate property we have all the data needed to output the pagination links.

At the beginning we want to check if there is a need for pagination in the first place {% if article_collection.paginate.total_pages > 1 %}. total_pages property stores number of pages needed to display all the articles in the collection, so with this if statement we are telling our widget to display the pagination only if number of pages is greater than 1.

Next, we are checking if there are any pages to be shown before and after the current page with {% if article_collection.paginate.previous %} and {% if article_collection.paginate.next %}. These two properties store the index number of previous and next page respectively. The flow control we have in place is telling the widget to display nested block of code only if there are next and previous pages to be shown. Inside href attributes of next and previous links we are placing appropriate urls with {{article_collection.paginate.next_url}} and {{article_collection.paginate.previous_url}}

After we save the widget blueprint we can add it to a page. As we have referenced article_collection in our widget blueprint, user has the following options to configure the widget:

  • Select the categories and types of articles that will be included in the collection
  • Number of articles per page - this will be used for our pagination flow control
  • The page to be used when the link of an article is clicked. This page should contain a widget that is referencing the article result liquid tag

In this example we were using article_collection as a backbone of our widget. You can use any of the liquid tags and objects to build your custom widgets, i.e. for displaying single articles, navigations, galleries, etc. If you would like to add custom fields to your widgets to gather additional input from users read Going further with a custom widget.

Going further with a custom widget

In article Creating a new widget we covered how to use predefined liquid tags when creating our custom widget blueprints. But, custom widget blueprints are not limited only by the content stored in the unroole. You can add various fields to your widget in order to gather input from the user on how certain elements should behave, or custom content that should be displayed on the page. This custom content could be a text or any asset uploaded to the account.

As a simple demonstration we will create a widget blueprint that will be used to create social media links and icons.

<div class=”social-link”>
    <a href=”{{simple_string-Social_URL}}” class=”social-button”>
    <i class=”fa fa-{{simple_string-Icon_Name}}”></i>
</a>
</div>

When added to a page/layout in the editor, widget above will have two input fields “Social URL” and “Icon Name”. These input fields are generated by simply referencing the liquid tag simple_string in the widget code. The label of the input field is generated by words added after the ‘-’ following the liquid tag. Always use underscores to denote a space between words.

When rendered on a website, input given by the user will show up where we placed it in a widget. So, Social URL will populate the href attribute of the link, and Icon Name will be added to the class of i tag. On our example website we will use FontAwesome framework so the icon name will determine which icon will be displayed.

Here is html of the widget rendered on the website, if the user added ‘http://twitter.com/unroole’ as Social URL and ‘twitter’ as Icon Name:

<div class=”social-link”>
    <a href=”http://twitter.com/unroole” class=”social-button”>
        <i class=”fa fa-twitter”></i>
    </a>
</div>

Website owners usually want to add several social media links to their website and this number is not known by the website designers and developers in advance. Especially if you are building a theme to sell on one of the markets. The widget blueprint above can be added to page/layout for each social media link. But, indefinite number of these links can break the intended layout of the website.

That is why it would be wise to have a wrapping div tag, with class social-wrapper applied, and place all the widgets inside. As we don’t know how many social links are there going to be, we will create a separate Wrapper widget blueprint whose only purpose will be to add this wrapper div around all the widgets. Here is the code of our Wrapper widget:

<div class=”social-wrapper”>
    {{structured}}
</div>

structured liquid tag we used here denotes that this widget accepts child widgets inside of it and where will those widgets be rendered in the html. If we add wrapper widget to our page/layout it will have an arrow next to the title telling us that it is a structured widget and that other widgets can be placed inside as child widgets.

In page/layout editor if you add Wrapper widget and place three social links widgets inside it, this is how the final html will be rendered:

<div class=”social-wrapper”>
    <div class=”social-link”>
        <a href=”http://twitter.com/unroole” class=”social-button”>
            <i class=”fa fa-twitter”></i>
        </a>
    </div>
    <div class=”social-link”>
        <a href=”http://facebook.com/unroole” class=”social-button”>
            <i class=”fa fa-facebook”></i>
        </a>
    </div>
    <div class=”social-link”>
        <a href=”http://youtube.com/unroole” class=”social-button”>
            <i class=”fa fa-youtube”></i>
        </a>
    </div>
</div>

Input from a user is not limited to text input fields. You can use dropdowns and numbers inputs as well.

Lets build a custom Gallery Slider widget blueprint which will give users the option to choose a type of slide animation, slide duration and whether or not to display the thumbnails below the slider. For this widget we will use a Gallery liquid tag for gallery data, and several other tags to gather input from the user.

{% dropdown-animation_type {"Fade": "fade", "Slide up" : "slide-up", "Slide left" : "slide-left", "Slide right": "slide-right"} %}
{% dropdown-show_thumbnails {"Yes": "yes", "No" : "no" } %}
<div class="gallery-wrapper" data-animation="{{dropdown-animation_type}}" data-duration="{{simple_number-Slide_Duration}}">
    <div class="gallery-container">
        {% for img in gallery.items %}
            <div class="slide">
                <img src="{{img.sizes.original.url}}" alt="{{img.sizes.name}}" />
            </div>
        {% endfor %}
    </div>
    {% if dropdown-show_thumbnails == "Yes" %}
        <div class="gallery-thumbs">
            {% for img in gallery.items %}
                <div class="thumb">
                    <img src="{{img.sizes.thumbnail.url}}" alt="{{img.sizes.name}}" />
                </div>
            {% endfor %}
        </div>
    {% endif %}
</div>

Let’s analyse the code from the top. On the first line we are declaring our dropdown {% dropdown-animation_type {"Fade": "fade", "Slide up" : "slide-up", "Slide left" : "slide-left", "Slide right": "slide-right"} %} . As it is wrapped in a liquid brackets ( {% %} ) this declaration will not be rendered in the html.

  • dropdown - this is a liquid tag for creating a dropdown
  • animation_type - this is the name of our dropdown which we will use later in the code where we want the selected value to show up
  • {"Fade": "fade", "Slide up" : "slide-up", "Slide left" : "slide-left", "Slide right": "slide-right"} - these are the key : value pairs of each option in the dropdown. Key will be shown to the user and value will be stored as selected item

Same goes for the dropdown that will let user decide to show the thumbnails below the gallery or not.

Next we will fill our data attributes in the .gallery-wrapper div, data-animation="{{dropdown-animation_type}}" and data-duration="{{simple_number-Slide_Duration}}" which we will reference in our CSS or JavaScript to customize the animation per user input. data-animation="{{dropdown-animation_type}}" will store value of the user-selected key, so if user selects “Slide Left” in the dropdown when adding a widget to a page/layout, this attribute will be rendered as data-animation="slide-left" in the html. {{simple_number}} tag is similar to {{simple_string}} tag, with the difference being that {{simple_number}} is limited to only numbers on input. So if a user enters text in this field while adding a widget, it will display an error. With our data-duration=”{{simple_number-Slide_Duration}}” we are creating an input field for the widget, and once the user enters a value i.e. 3000, it will be rendered as data-duration=”3000” in the html.

Next piece of code is using a gallery tag and the user will have an option to select which gallery to use. We created a for loop that will iterate through every asset object stored in the gallery.items and execute the block of code between {% for img in gallery.items %} and {% endfor %}. To better understand what we are doing with this loop let’s inspect the object that is available to us when using the gallery tag:

gallery = {
    id: int,
    name: string,
    type: string,
    description: string,
    size: int,
    items: [
        {
            asset: object,
            sizes: object,
            name: string,
            description: string,
            link: string,
            html_id: string,
            html_class: string,
            target: string,
            link_label: string
        }
    ]
}

As you can see gallery.items is an array of objects, and each object represents an asset added to the gallery. These objects are identical to the asset_image object we covered in the Create a new widget article. In our block of code that is executed for each asset of the gallery we are simply outputting the properties of this object.

<div class="slide">
    <img src="{{img.sizes.original.url}}" alt="{{img.sizes.name}}" />
</div>

For the src attribute of the img tag we are using the url of the asset in original size, and for the alt attribute we are using the asset name.

Next we want to give the user an option to choose whether to display the thumbnails below the gallery or not.

{% if dropdown-show_thumbnails == "yes" %}
    <div class="gallery-thumbs">
        {% for img in gallery.items %}
            <div class="thumb">
                <img src="{{img.sizes.thumbnail.url}}" alt="{{img.sizes.name}}" />
            </div>
        {% endfor %}
    </div>
{% endif %}

We are adding a control flow with {{dropdown}} tag. In the widget, this tag will output a select box with two options, Yes and No, and the title of the checkbox will be “Show Thumbnails”. After the if statement we are repeating the same for loop as in the gallery container only with thumbnail image size instead of original.

When the user adds this widget to the page, s/he will have the following options to configure:

  • Gallery - selects a gallery to display
  • Animation Type - dropdown with animations to choose from
  • Slide Duration - number input box to add slide duration value
  • Show Thumbnails - dropdown with options Yes and No

In this example we were using Gallery as a backbone of our widget. You can use any of the liquid tags to build your custom widgets, i.e. for displaying single articles, navigations, article collections, etc.

To learn more about the liquid tags and syntax used in the unroole, please read this article.

Article

Articles are unroole’s version of a post. Below is the form responsible for an article entry.

Most things on this form are accessible through liquid. Below we can see what the system widget “Article Exact” does.

{% comment %}  ARTICLE SINGLE EXACT       
************************************************************************************
What the widget does:
- Allows a specific article to be chosen in the Layout Editor
- Checks if article has a "featured image", if it does, the image is displayed
- Populates remaining data for article (title, date, author, body)
- The date is formatted according to liquid filters ( date: "%b %d")
- Creates a "Read More" link if article points somewhere
NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}
<article class="un-article">
    {% if article.featured_image %}
        <div class="image-container">
            <img src="{{article.featured_image.sizes.original.url}}" alt="{{article.featured_image.name}}"/>
        </div>
    {% endif %}
    <h2 class="title">{{article.title}}</h2>
    <span class="date">{{article.published_on | date: "%b %d"}}</span>
    <span class="author">{{article.author.first_name}} {{article.author.last_name}}</span>
    <div class="body">{{article.body}}</div>
    {% if article.link %}
        <a class="un-link" href="{{article.link}}">Read More</a>
    {% endif %}
</article>

Article object

article = {
    id: int,
    title: string,
    featured: boolean,
    activates_at: date,
    published_on: date,
    updated_at: date,
    body: string,
    link: string (URL), 
    author: {
        first_name: string,
        last_name: string
    },
    category: {
        id: int,
        name: string,
        description: string,
        urlized_name: string,
        updated_at: date
    },
    type: {
        id: int,
        name: string,
        urlized_name: string,
        updated_at: date
    },
    featured_image: object
}

Accessible Data

  • article.id - unique identifier of article
  • article.title - title of article
  • article.featured - if article is featured. Default value false
  • article.activates_at - when article is *scheduled* to go live. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article.published_on - the date visible with article, can be different than activates_at. Date format:yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article.updated_at - last updated time of the article. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article.body - the content of the article
  • article.link - url that the article points to. Format URL
  • article.author - returns author object (currently based on creator of article)
  • article.author.first_name - first name of author
  • article.author.last_name - last name of author
  • article.category - returns category object
  • article.category.id - unique identifier of category associated with article
  • article.category.name - name of category associated with article
  • article.category.description - category description
  • article.category.urlized_name - urlized name of category
  • article.category.updated_at - last updated time of the category. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article.type.id - unique identifier of type associated with article
  • article.type.name - name of type associated with article
  • article.type.urlized_name - urlized name of type
  • article.type.updated_at - when type was updated. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article.featured_image - returns Asset object

Article Collection

An Article Collection is essentially an array of articles. Below we can see how the system widget “Article Collection” is built:

{% comment %}   ARTICLE COLLECTION        
************************************************************************************
What the widget does:
- Allows user to select a collection of articles by "Type" and "Category" in the Layout Editor
- Checks if each article has a "featured image", if it does, the image is displayed
- Populates remaining data for each article (title, date, author, body)
- The date is formatted according to liquid filters ( date: "%b %d")
- Creates a "Read More" link if any particular article points somewhere
- A simple paginator is created.

NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}


{% for a in article_collection.items %}
    <article class="un-article">
        {% if a.featured_image %}
            <div class="image-container">
                <img src="{{a.featured_image.sizes.original.url}}" alt="{{a.featured_image.name}}"/>
            </div>
        {% endif %}
        <h2 class="title">{{a.title}}</h2>
        <span class="date">{{a.published_on | date: "%b %d"}}</span>
        <span class="author">{{a.author.first_name}} {{a.author.last_name}}</span>
        <div class="body">{{a.body}}</div>

    {% if a.link %}
        <a class="un-link" href="{{a.link}}">Read More</a>
    {% endif %}

    </article>

{% endfor %}

<span class="un-paginator">
    {% if article_collection.paginate.total_pages > 1 %}
        {% if article_collection.paginate.previous %}
            <a class="prev-btn" href="{{article_collection.paginate.previous_url}}"> < </a>
        {% endif %}

        {{article_collection.paginate.current}} / {{article_collection.paginate.total_pages}}

        {% if article_collection.paginate.next %}
            <a class="next-btn" href="{{article_collection.paginate.next_url}}"> > </a>
        {% endif %}
    {% endif %}
</span>

Article Collection object

article_collection = {
    items: array[article_object],
    paginate: {
        previous: int,
        previous_url: string,
        next: int,
        next_url: string,
        current: int,
        total_pages: int,
        per_page: int,
        total_items: int
    }
}

Accessible Data

  • article_collection.items - Article objects in article collection
  • article_collection.paginate.previous - index number of previous page
  • article_collection.paginate.previous_url - url of previous page
  • article_collection.paginate.next - index number of next page
  • article_collection.paginate.next_url - url of previous page
  • article_collection.paginate.current - index number of current page
  • article_collection.paginate.total_pages - number of pages
  • article_collection.paginate.per_page - items per page
  • article_collection.paginate.total_items - total number of items

Gallery

Gallery is made up of Gallery Items. Each gallery item references an asset in the system but has it’s own asset information specific to the gallery. Below we can see the system widget Gallery and how it works.

{% comment %}  GALLERY
************************************************************************************
What the widget does:
- Allows a gallery to be selected in the Layout Editor
- Iterates through entire gallery and checks if IDs or classes have been set for gallery items, if they have, render them.
- Displays each item as a thumbnail that links to original asset

NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}

<ul class="un-gallery">
    {% for i in gallery.items %}
        <li class="un-gallery-item {% if i.html_class %}{{i.html_class}}{% endif %}" {% if i.html_id %} id="{{i.html_id}}" {% endif %}>
            {% if i.link %}
                <a href="{{i.link}}" target="{{i.target}}">
                    {% if i.asset.type == 'image' %}
                        <img src="{{i.sizes.original.url}}" alt="{{i.name}}" />
                    {% else %}
                        <img src="{{i.sizes.thumb.url}}" alt="{{i.name}}" />
                    {% endif %}
                </a>
            {% else %}
                {% if i.asset.type == 'image' %}
                    <img src="{{i.sizes.original.url}}" alt="{{i.name}}" />
                {% else %}
                    <img src="{{i.sizes.thumb.url}}" alt="{{i.name}}" />
                {% endif %}
            {% endif %}
        </li>
    {% endfor %}
</ul>

Gallery object

gallery = {
    id: int,
    name: string,
    type: string,
    description: string,
    size: int,
    items: [
        {
            asset: object,
            sizes: object,
            name: string,
            description: string,
            link: string,
            html_id: string,
            html_class: string,
            target: string,
            link_label: string
        }
    ]
}

Accessible Data

  • gallery.id - unique identifier of article
  • gallery.name - title of article
  • gallery.type - returns what type of gallery its is (video, image, document, all)
  • gallery.description - description of the gallery
  • gallery.size - number of assets in the gallery
  • gallery.items - array of gallery_asset objects
  • .asset - “asset” object being referenced by gallery item
  • .sizes - shortcut to “sizes” object from original Asset
  • .name - name of gallery item
  • .description - description of gallery item
  • .link - URL of where the asset links to. Format URL
  • .html_id - ID set on gallery item
  • .html_class - Class set on gallery item
  • .target - How the link opens: “_self” or “_blank”
  • .link_label - Label of the link

Asset

The asset tag allows for a user to chose an unroole asset in the layout editor to be used inside a widget. There are a number of different types that an asset can be so the system widget tries to deal with each case.

{% comment %}  ASSET
************************************************************************************
What the widget does:
- Allows a specific asset to be chosen in the Layout Editor
- Checks what type of asset it is
- Based on the type of asset it decides how to display this asset
- Uses asset name as the "ALT"
NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}
<div class="un-asset">
    {% case asset.type %}
        {% when 'image' %}
            <img class="type-image" src="{{asset.sizes.original.url}}" alt="{{asset.name}}" />
        {% when 'youtube' %}
            <object class="type-youtube" width="640" height="480" data="http://www.youtube.com/v/{{asset.video_id}}">
            </object>
        {% when 'pdf' %}
            <a class="type-pdf" href="{{asset.sizes.original.url}}" class="un-asset"><img src="{{asset.sizes.thumb.url}}" alt="{{asset.name}}" /></a>
        {% when 'ico' %}
            <a class="type-ico" href="{{asset.sizes.original.url}}" class="un-asset"><img src="{{asset.sizes.thumb.url}}" alt="{{asset.name}}" /></a>
        {% when 'document' %}
            <a class="type-document" href="{{asset.sizes.original.url}}" class="un-asset"><img src="{{asset.sizes.thumb.url}}" alt="{{asset.name}}" /></a>
        {% else %}
            <a class="type-other" href="{{asset.sizes.original.url}}" class="un-asset"><img src="{{asset.sizes.thumb.url}}" alt="{{asset.name}}" /></a>
    {% endcase %}
</div>

Asset Object

asset = {
    id: int,
    name: string,
    type: string,
    description: string,
    updated_at: date,
    video_id: string
    sizes: {
        original: {
            url: string,
            type: string,
            file_format: string
        },
        thumb: {
            url: string,
            type: string,
            file_format: string
        },
        icon: {
            url: string,
            type: string,
            file_format: string
        }
    }
}

Accessible Data

  • asset.id - unique identifier of asset
  • asset.name - name of asset
  • asset.type - type of asset: 'image', 'youtube', 'pdf', 'ico', 'document'
  • asset.description - description of asset
  • asset.updated_at - when asset was updated. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • asset.video_id - id of youtube video for embed code
  • asset.sizes.original - see below
  • asset.sizes.thumb - see below
  • asset.sizes.icon - see below

Accesible Data in asset.sizes.(original, thumb or icon)

  • .url - address of actual file in respective size. Format URL
  • .type - type of size: ‘original’, ‘thumb’, ‘icon’
  • .file_format - extension of file: ‘jpg’, ‘pdf’ etc.

Asset Image

Asset Image is almost identical to asset. The distinguishing feature is when a user is choosing an asset in the layout editor, their options are restricted to images only. Becuase of this restriction, the Asset Image widget is a lot simpler than Asset as shown below:

{% comment %} ASSET IMAGE
************************************************************************************
What the widget does:
- Allows an image asset to be chosen in the Layout Editor
- Displays the asset image and uses its name as the "ALT"
NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}
<div class="un-asset">
    <img class="type-image" src="{{asset_image.sizes.original.url}}" alt="{{asset_image.name}}" />
</div>

Asset Image Object

asset_image = {
    id: int,
    name: string,
    description: string,
    updated_at: date,
    sizes: {
        original: {
            url: string,
            type: string,
            file_format: string,
        },
        thumb: {
            url: string,
            type: string,
            file_format: string,
        },
        icon: {
            url: string,
            type: string,
            file_format: string,
        }
    }
}

Accessible data

  • asset_image.id - unique identifier of asset
  • asset_image.name - name of asset
  • asset_image.description - description of asset
  • asset_image.updated_at - when asset was updated. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • asset_image.sizes.original - see below
  • asset_image.sizes.thumb - see below
  • asset_image.sizes.icon - see below

Accessible data in asset_image.sizes.(original, thumb, icon)

  • .url - address of actual file in respective size. Format URL
  • .type - type of size: ‘original’, ‘thumb’, ‘icon’
  • .file_format - extension of file: ‘jpg’, ‘pdf’ etc.

Theme

Themes aren’t widgets but they do have data that widgets can use. Below we can see the HTML Header widget using theme data:

<head>
    {{ theme.css }}
    {{ theme.js }}
    {{ structured }}
</head>
Theme Object
theme = {
    id = int,
    css = array[string],
    js = array[string],
    root = string
}

Accessible data

  • theme.id - unique identifier of theme
  • theme.css - array of included css files not wrapped in html
  • theme.js - array of included js files not wrapped in html
  • theme.root - returns the full path of the root of the theme

Navigation

Navigation tag is used to access data of a given navigation. Below we can see the Navigation system widget. Because navigation objects are recursive they can go an arbitrary number of levels deep. The Navigation system widget is limited to three levels, but expanding this to accommodate as many levels as you need can be done with a custom widget.

{% comment %}   NAVIGATION
************************************************************************************
What the widget does:
- Allows user to choose a navigation in the layout editor
- Iterates through all items on the first level of the navigation, according to their sequence and creates an anchor pointing to the url defined by the navigation item in unroole.
- If those navigation items have children, it iterates through those and creates the second level
- If those children have children, it iterates through those and creates the third level
- Does nothing for beyond the third level, though this could be extended following the same pattern
NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}
<ul class="un-navigation">
    {% for first_level in navigation.items %}
        <li class="un-navigation-item {{first_level.html_class}}" {% if first_level.html_id != blank %} id="{{first_level.html_id}}"{% endif %}>
            <a href="{{first_level.url}}" target="{{first_level.target }}">{{first_level.label}}</a>
            {% if first_level.nav_items %}
                <ul>
                {% for second_level in first_level.nav_items %}
                    <li class="un-navigation-item {{second_level.html_class}}" {% if second_level.html_id != blank %} id="{{second_level.html_id}}"{% endif %}>
                        <a href="{{second_level.url}}" target="{{second_level.target }}" >{{second_level.label}}</a>
                        {% if second_level.nav_items %}
                            <ul>
                            {% for third_level in second_level.nav_items %}
                                <li class="un-navigation-item {{third_level.html_class}}" {% if third_level.html_id != blank %} id="{{third_level.html_id}}"{% endif %}>
                                    <a href="{{third_level.url}}" target="{{third_level.target }}" >{{third_level.label}}</a>
                                </li>
                            {% endfor %}
                            </ul>
                        {% endif %}
                    </li>
                {% endfor %}
                </ul>
            {% endif %}
        </li>
    {% endfor %}
</ul>

Navigation object

navigation = {
    id = int,
    label = string,
    description = string,
    html_id = string,
    html_class = string,
    target = string,
    url = string,
    currently_active = boolean,
    items = array[navigation_object]
}

Accessible data

  • navigation.id - unique identifier of navigation
  • navigation.label - label on navigation
  • navigation.description - description of navigation
  • navigation.html_id - id
  • navigation.html_class -class
  • navigation.target - where will the link open (_blank, _self)
  • navigation.url - the url that the navigation item points to
  • navigation.currently_active - returns true if child is selected
  • navigation.items - see below

Accessible data in navigation.items

Same as above. Recursive.

Article Result

Article_result tag is used to create widgets that display an article based on an article id appended in the URL. Below is a system widget “Article Result”:

{% comment %}  ARTICLE SINGLE RESULT
************************************************************************************
What the widget does:
- An article is dynamically populated based on url (&article_id=n) which was created by page of origin
- Checks if article has a "featured image", if it does, the image is displayed
- Populates remaining data for article (title, date, author, body)
- The date is formatted according to liquid filters ( date: "%b %d")
NOTE: This is a "Liquid" comment. It will not be rendered.
************************************************************************************
{% endcomment %}
<article class="un-article">
    {% if article_result.featured_image %}
        <div class="image-container">
            <img src="{{article_result.featured_image.sizes.original.url}}" alt="{{article_result.featured_image.name}}"/>
        </div>
    {% endif %}
    <h2 class="title">{{article_result.title}}</h2>
    <span class="date">{{article_result.published_on | date: "%b %d"}}</span>
    <span class="author">{{article_result.author.first_name}} {{article_result.author.last_name}}</span>
    <div class="body">{{article_result.body}}</div>
</article>

Article Result Object

article_result = {
    id: int,
    title: string,
    featured: boolean,
    activates_at: date,
    published_on: date,
    updated_at: date,
    body: string,
    link: string,
    author: {
        first_name: string,
        last_name: string,
    },
    category: {
        id: int,
        name: string,
        description: string,
        urlized_name: string,
        updated_at: date
    },
    type: {
        id: int,
        name: string,
        urlized_name: string,
        updated_at: date
    },
    featured_image: object
}

Accessible Data

  • article_result.id - unique identifier of article
  • article_result.title - title of article
  • article_result.featured - if article is featured. Default value false
  • article_result.activates_at - when article is scheduled to go live. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article_result.published_on - the date visible with article, can be different than activates_at. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article_result.updated_at - when article was updated. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article_result.body - the content of the article
  • article_result.link - url that the article points to. Format: URL
  • article_result.author.first_name - first name of author
  • article_result.author.last_name - last name of author
  • article_result.category - returns category object
  • article_result.category.id - id of category associated with article
  • article_result.category.name - name of category associated with article
  • article_result.category.description - category description
  • article_result.category.urlized_name - urlized name of category
  • article_result.category.updated_at - when category was updated. Date format: yyyy-mm-dd T hh:mm:ss.sss -timezone
  • article_result.type.id - id of type associated with article
  • article_result.type.name - name of type associated with article
  • article_result.type.urlized_name - urlized name of type
  • article_result.type.updated_at - when type was updated
  • article_result.featured_image - returns Asset object

Content Management

unroole Core

The unroole Core refers to the series of pages accessible after logging into unroole. From here you can access different parts of the system. A more detailed look at the components that make up unroole can be found below.

Accessing accounts and channels

The account or channel you are currently on is represented by the large icon on the top left corner of the screen. Clicking on the icon will take you to the dashboard of that account or channel. Right below the icon we can see both the account name and channel name respectively.

Clicking on the icon beside each name will log you out of that channel or account. Clicking on the name opens the slideout, letting you chose an account or channel to access. In the top left corner of the slide out you can type to filter your options.

Sidebar

The sidebar is broken into a few expandable tabs: content, appearance, advanced menu and settings. What is displayed in the sidebar is dependant on the level the user is on (profile, account or channel) as well as the users permissions. Some things that belong to the account, are shared and accessible from the channel sidebar for ease of use while working in a channel, such as assets, articles etc.

Breadcrumbs

The very top of each page contains the breadcrumbs navigation. This is a quick way to navigate unroole according to the hierarchy.

Action buttons

Action buttons are located near the top of every page and they are contextual. On the dashboard, the “Quick Access” section can be customized so that unroole can be quickly navigated based on the users preference. To do so, go to the dashboard, and click the blue pencil icon beside the “Quick Access” title.

Tables

Most pages in unroole have some sort of tables displaying data. The top right corner usually has a search filter. The very right of the table has the actions which manipulate the items within the table. Hovering over each icon displays a tooltip describing the action. Some columns can be sorted by clicking the arrows beside the column title.

Multi-tenancy

Traditionally, different web-properties required their own instances / setups. Updating and maintaining these instances can be an exponential drain on teams as their portfolios grow.

unroole has the capability to have thousands of channels, in hundreds of accounts, all maintained from (but not limited to) a single login.

Accounts

Accounts are used to separate clients. Accounts share content amongst all their channels. For example, an account can have a website, a separate mobile website, and a facebook page. Uploading assets to the account will make them available to all of these different channels. Modifying that asset will modify it across all channels. Updating an article will update that particular article for all sites using this article.

Accounts are represented by a tree icon in unroole, while Channels are represented by a leaf. Clicking the name area of the account will open a slideout menu allowing you to chose an account to access. Hovering over the tree icon will turn in into an “X” allowing you to exit this particular Account.

From the Sidebar you can access all your Accounts and Channels.

In the main area you have the following panels:

  • Change your password Action button: Here you can change your password

  • Profile panel: These are the data you initially added when creating unroole profile. To edit, click pencil icon next to the panel title

  • Settings: These are general settings. To edit, click pencil icon next to the panel title

  • Recently Used Accounts: Here is the table of 5 recently used Accounts. To access them, click on the arrow at the end of a row


Profile > Accounts

If you click on accounts in the Manage tab of the Sidebar, you will land on a page where all of your accounts are displayed. In the main panel you have the overview of each account. To edit/delete an account click on a pencil icon at the end of a row. To add a new account click on ‘Create Account’ action button.

Profle > Accounts > Create Account

In the main panel add details for a new Account:

  • Name of the account

  • Subdomain will be automatically generated based on the name or you can add a new one

  • Logo of the account that will be displayed next to the account name in the accounts lists

  • Click “Create” or “Cancel” action button


Account name > Dashboard

To access a particular account click ‘Account' in the Dashboard.

In the main area there are two panels:

  • Quick access: Here you can set shortcuts to your most used actions

  • Channel activity: Here is the overview of latest activities in your Channels


In the Sidebar you have the following tabs:

  • Content: from here you can access different types of content you can add to your account. All content added will be available and ready to use in all channels belonging to this account.

  • Appearance: From here you can access all widgets bleuprints and themes belonging to the account

  • Manage: From here you can access all channels belonging to the Account

  • Advanced Menu:
    • Scheduling: from here you can manage the scheduling of every piece of content belonging to all the channels in your account

    • Blueprints: from here you can access, add and edit all layout blueprints, page blueprints, CSS blueprints and JavaScript blueprints belonging to your account

    • Tags: from here you can view all the content by tags
  • Settings: from here you can edit the properties of your account like name, logo image, subdomain and organization.


Channels

Channels are used to separate different properties belonging to a single account. Accounts share content amongst all their channels. Because account content is shared, creating an article while in a particular channel will share that article amongst all other channels on that account. Uploading an asset into a channel will actually upload that asset to the account so that it may be shared across channels.

Channels are represented by a leaf icon in unroole, while accounts are represented by a tree. Clicking the name area of the channel will open a slideout menu allowing you to choose a channel to access. Opening the channel slideout without choosing an account first, allows you to select a channel from all channels available across all accounts. Hovering over the tree icon will turn in into an “X” allowing you to exit this particular account.

To create a new channel, access your account and click “Channel” in the sidebar. In the slide out menu click on a “+” icon.

Account name > Create Website Channel

In the main panel add your channels details, name, subdomain if different from the name, logo of the channel and starting theme. Logo of the channel will be used within the platform, not on the website itself.

Account name > Channel name > Dashboard

Once you access your channel you will land on a main channel dashboard. Here is the overview of the main sections:

In the main area you have the following panels:

  • Quick access: Here you can set shortcuts to your most used actions

  • Summary: Here you have the overview of the current theme used, next theme in schedule and the number of pages created for the channel

  • Recent activity: Here is the overview of recent changes within your channel


In the Sidebar you have the following sections:

  • Just below the channel logo you can access all the accounts and Channels you own

  • Content: from here you can access different types of content you can add to your channel. The content available is shared content from the account that this channel belongs to, as well as content added only to this channel.

  • Appearance: From here you can access all building blocks of your website. Besides the Widgets and Themes that are inherited from the account, here you have Channel-specific Pages, Layouts and CSS/JavaScript blueprints.

  • Advanced Menu:
    • Scheduling: from here you can schedule every piece of content belonging to your channel

    • Blueprints: from here you can access, add and edit all Layout Blueprints, Page Blueprints, CSS Blueprints and JavaScript Blueprints belonging to your Channel

    • Tags: from here you can access all the Tags belonging to your Channel

    • Settings: from here you can edit the properties of your Channel

Shared Content

Some content is shared between channels on an account. This is to allow for easier management of content across web properties. Below is a list of some of these shared content types.

Assets

Assets can be images, documents, videos etc.

Galleries

Galleries are collections of assets.

Articles

Articles are the original content type.

Widgets

Widgets are code blocks used to assemble pages.

Themes

Not all themes are shared across channels. Only themes created inside the Account are shared across channels. Creating a theme inside a channel will make it exclusive to this channel. This is a practical distinction as the theme of a mobile site could be entirely different from the desktop site.

Blueprints

Blueprints are exactly what they sound like. They contain blueprints that can be used to create actual things in the desired Channel.

Uploading different types of Assets

Account name > Channel name > Assets

In the main window, you have the “Upload Assets” action button and Assets panel.

In the Assets panel you have a table with all the assets uploaded to the Channel and inherited from the Account. All asset belong to the account no matter where they are uploaded to.

From here you can edit, delete and download each asset. To perform bulk editing and deleting, select Assets by clicking a checkbox at the beginning of each row, and below the table select and apply the action you wish to perform.

Upload a new Asset

  • Click “Upload asset” action button
  • In Upload Asset panel add tags for the assets.

  • Select the type of the Asset you wish to upload, Image or a YouTube video

  • Image:
    • Select files you wish to upload

    • Files are added to the upload queue, and now you can optionally rename the file, remove it from the queue and by clicking ‘Show options’ define different filename, add specific tags for each image, and a description

  • YouTube video:
    • Click on ‘Add more’ to open video options panel

    • Paste video ID or URL

    • By clicking Show options you can optionally add asset specific tags and a description


Managing Assets

As with other resources, you can add various tags to your assets. Tags are used to quickly find your assets when adding them to different content types (pages, layouts, widgets).

Edit Assets

Account name > Channel name > Assets > Edit Asset

In the main window you have three panels:

  • Asset: here you can edit asset name, tags and description

  • Asset sizes: In the original tab you can upload a new file. After the upload is done click ‘Regenerate’ to create other two sizes of the new image. Thumbnail and Icon sizes are scaled and cropped to 256x256 and 32x32 px respectively 

  • Used in: In this panel you have the table with all the articles, pages and galleries that are displaying this asset


Creating new Pages

Account name > Channel name > Pages

On the Pages page you have a main panel where all your existing pages are accessible. To create a new page click on a Create page action button.

Account name > Channel name > Pages > Create page

Fill in the fields:

  • Name - name of your page
  • Tags - can be used for searching or sorting
  • Description - page description is stored in page_metadata.description and it can be used in meta tag of the page
  • Keywords - web page keywords which will be stored in page_metadata.keywords and it can be used in meta tag of the page
  • Permalink - by default permalink will be generated from the name in serialized format, so ‘Contact us’ will be ‘contact-us’. If you wish you can change the default permalink to anything you like
  • Channel layout - here you can select which layout will be applied to the theme. By default all pages have the channel default layout, which means that if you change your layout on the channel level, that will affect the pages with default option selected. If you would like to use a specific layout per page, than you can choose any of the existing layouts
  • Scheduling - select the date and time when the page is scheduled to go live.

Once you click the “Create” button, you will be redirected to Pages page and your newly created page will be in the list.

To add content to a page click on the arrow next to the name. A new row will open below with all the versions of the page and dates when it is scheduled, added and updated. At the end of the each row there are icons for various actions you can take for each version of the page:

  • Edit Version - Here you can edit all the fields available when creating a page
  • New version - Create a new version of the page
  • View in page editor - Add content to a page
  • Delete - deletes the version of the page
  • Preview - You can preview the entire page in a browser tab

To add/change content in each version click on the “View in page editor” icon and Page editor will open up. Detailed info on each part of the editor can be found in Layout / Page Editor Interface article.

In the bottom tray in the left box there is a tree of widgets added to the Page. As some widgets are configured to accept nested widgets, all their children widgets are indented below them. By clicking an arrow next to the parent widget you can collapse and expand nested widgets. To rearrange the order of the widget simply click and drag them to the desired position. Same goes for placing and removing child widgets in/from their parents.

If you click on each widget in the tree, in main panel you will see various options and inputs you can make on that particular widget. To add a new widget to the page click on the ‘New’ action button in the bottom of widget tree. In the main panel you will see all the widgets available. Click on the desired widget and in the main panel you will be presented with the set of options and inputs you can fill in. After you are done, click on “Save changes” button in the upper left corner of the tray and your changes will be visible in the preview window above it. Options you will have at your disposal depend on the widget you use, or more precisely, the liquid tags used in those widgets. As system widgets use the same tags, here you can view all the options available to system widgets.

To remove a widget, click on it in the widget tree and click “Delete” action button in the bottom of the widget tree.

If your page is scheduled at the time, your changes will be live on the website immediately.

Creating a new page from a Page blueprint

To create a new page from a Page blueprint, click on Blueprints in the Advanced section of the sidebar.

Account name > Channel name > Blueprints

Click Pages tab. Here you will have a table of all Page blueprints available for your theme/channel. At the end of a row of a blueprint you would like to use, click on a ‘Create page from this template’ icon.

Account name > Channel name > Blueprints > Clone page blueprint

Fill in the fields:

  • Name - name of your page
  • Tags - can be used for searching or sorting
  • Description - page description is stored in page_metadata.description and it will be used in meta tag of the page
  • Keywords - web page keywords which will be stored in page_metadata.keywords and it will be used in meta tag of the page
  • Permalink - by default permalink will be generated from the name in serialized format, so ‘Contact us’ will be ‘contact-us’. If you wish you can change the default permalink to anything you like
  • Choose a level - choose whether the page should be available to the channel or entire account

After you click “Create” button, you will be redirected to the Pages page and your cloned page will be ready for editing and scheduling (new page is not scheduled by default).

Managing Pages

Each page can have several versions and each version can be scheduled for different times.

Creating a page version

Account name > Channel name > Pages

By clicking arrow next to a page a new row will slide down with all the versions of the page. By default there is always one version of the page. To create a new version, choose a version you would like to use as a starting point and click on “New version” icon.

Fill in the fields:

  • Name - name of your page
  • Tags - can be used for searching or sorting
  • Description - page description is stored in page_metadata.description and it will be used in
  • Keywords - web page keywords which will be stored in page_metadata.keywords and it will be used in tag of the page
  • Permalink - by default permalink will be generated from the name in serialized format, so ‘Contact us’ will be ‘contact-us’. If you wish you can change the default permalink to anything you like
  • Channel layout - here you can select which layout will be applied to the theme. By default all pages have the channel default layout, which means that if you change your layout on the channel level, that will affect the pages with default option selected. If you would like to use a specific layout per page, than you can choose any of the existing layouts
  • Scheduling - select the date and time when the page is scheduled to go live.

At the top you have the following action buttons:

  • Cancel - cancel creating a version and go back to the Pages page
  • Page Editor - enter Page Editor and edit content of the page
  • Archive - let’s you deactivate all versions of a page without deleting. It will cause a 404 if someone were to try and access the page explicitly.
  • Preview - preview the page in the browser.

To schedule and edit properties of each version, click on “Edit” icon for the desired version.

Scheduling and Versioning

Scheduling and Versioning Overview

Most content in unroole can be scheduled to go live. This lets you automate and coordinate content campaigns on future dates or website updates during off hours. Traditionally, cloud CMS systems forced users to work on live websites. Versions (discussed here) allow users to work on a version of a page, while the original is untouched, then swap them out at a scheduled time.
Because so many things are scheduled, unroole has a section dedicated to managing and overseeing the scheduling of everything. To access it, click on scheduling under the Advanced panel in the sidebar.

Scheduling Pages

Unlike articles (described here), pages aren’t scheduled. Instead, versions of a page can be scheduled. As long as one version is scheduled before the current time, the page is considered live. Creating a page, automatically creates one version. There must be at least one version of the page for that page to exist.

Scheduling a page version

  • Go to pages in your sidebar.
  • Click the blue arrow on your page to expand into the version view.
  • On the right side of the row, click pencil icon to edit.
  • From the versions Edit page you can schedule it by ticking “add to schedule on” and choosing a date and time.
  • Save changes for the change to take effect.

Scheduling Articles

Articles are straightforward to schedule. They can be scheduled immediately on create, or at any point afterwards.

  • Find your article in the table (accessible by clicking Articles on the sidebar)
  • On the right side of the row, click pencil icon to edit.
  • From the edit screen you can schedule it by ticking “add to schedule on” and choosing a date and time.
  • Save changes for the change to take effect.

Scheduling Themes

Unlike regular pieces of content (such as articles), only one theme can be live at any given time on a channel. For this reason, themes have a queue. Different themes can all be scheduled and the queue will determine which one takes precedence. The same theme can be scheduled multiple times in the queue.

  • To access your themes and theme queue, click on Themes in your sidebar.
  • Find the theme you would like to schedule.
  • On the right side of the row, click the “Schedule” action.
  • Choose a date and click “Schedule”.
  • Your theme should now be visible in the queue.

Scheduling Layouts

Layouts can be assigned to pages. However, most of the time, users want just one layout, that all the pages share. What users can schedule is the layout that will be the default for all pages that don’t have another layout set explicitly. Unlike regular pieces of content (such as articles), only one default layout can be live at any given time on a channel. For this reason, layouts have a queue. Different layouts can all be scheduled and the queue will determine which one takes precedence. The same layout can be scheduled multiple times in the queue.

  • To access your layouts and layout queue, click on Layouts in your sidebar.
  • Find the layout you would like to schedule.
  • On the right side of the row, click the “Schedule” action.
  • Choose a date and click “Schedule”.
  • Your Default Layout should now be visible in the queue.

Time Preview - Seeing the future

Scheduling a million things is great, but how can one see what the outcome will look like. Users can create Time Previews which allows them to see what a page will look like at a given point in time. Time previews are password protected, so they can be sent to clients / stakeholders, and they can be set to expire for additional control. To see a time preview in action follow the steps below:

  • Create a few articles and schedule them for different times in the future.
  • Create a home page with an article collection to display all of your articles.
  • Preview your website. No articles should show because none of them are currently live.
  • Click on Scheduling in the sidebar
  • Click the “Time Previews” Action to access your time previews.
  • Click the “Create Time Preview” to create one.
  • Fill in the access credentials and description.
  • Set a simulation time to a time after some of your articles go live.
  • Set the Token Expiry and click Create.
  • Your time preview should be visible in the table now. Click the link provided to go to it.
  • Type your username and password and submit.
  • You should now see your page with some of the articles on it.

When viewing a time preview a little panel will display in the bottom right corner of your screen. To leave your time preview and to be able to preview your regular website, click the “Clock” icon.

Intro To Versioning in unroole

Pages have versions. This allows for version control in a cloud workflow. Each version can be scheduled individually and the correct one will be live at a given time. To create a new version of a page follow the steps below:

  • Go to the Pages page, accessible by clicking Pages in the sidebar.
  • Click on the blue arrow on the left side of each page to expand the version view.
  • In the version row, click on the “New Version” action to create a new version based on this version.
  • Fill in the required information.
  • Click “Save Changes”

Expanding your Page row to see versions will now show a new version in the table. This version can now be edited, scheduled or deleted.

Scheduling Versions

  • Go to Pages accessible from the sidebar.
  • Click the blue arrow to expand a Page to view its versions
  • Click the pencil icon to edit the properties of that version.
  • Near the bottom of the page, click “add to schedule” and choose a time.
  • Save your changes.

Liquid

Special Uses

Besides using liquid tags to retrieve data and content stored with the Unroole, there are tags you can use to gather additional input from the user.

simple_string

simple_string tag is used to generate text input field in the widget. Value added by the user will be rendered in the html where the tag is placed.

Sample usage:

<section class=”greeting-box”>
    <h1>{{simple_string-Greeting_Title}}</h1>
    <h2>{{simple_string-Greeting_Subtitle}}</h2>
</section>

In the above example, simple_string is followed by a ‘-’ and the label of the field. There should be no spaces and special characters in the label. Underscores ‘_’ will be replaced with spaces when label is rendered in the widget.

When you add this widget to the page/layout editor you will have two input fields, Greeting Title and Greeting Subtitle. After you add content to the fields, i.e. ‘Welcome to my website!’ for the title and ‘It is built with the Unroole’ for the subtitle, and save your changes the following will be rendered in the html:

<section class=”greeting-box”>
    <h1>Welcome to my website!</h1>
    <h2>It is built with the Unroole</h2>
</section>

simple_number

simple_number works the same way as simple_string with only difference that simple_number only accepts numbers as values entered by the user. If the user adds text to this field, it will display an error. This is particularly useful when code created by your widget relays on number as an input.

Sample usage:

<section class=”rating-box”>
<p class=”rating-number {{simple_number-Rating_Mark}}”>Rating: {{simple_number-Rating_Mark}}</p>
</section>

When you add this widget to a page/layout editor, you will have only one input field as we are using the same label for both class name and actual rating number. This way you could apply different styles based on the rating.

dropdown

dropdown tag is used to generate a dropdown with several options that user can choose from.

Sample usage:

{% dropdown-Select_Color {"Red" : “red”, "Blue" : “blue”, "Purple" : ”purple”}%}
<div class=”{{dropdown-Select_Color}}>
    <h1><a href=”{{article.link}}”>{{article.title}}</a></h1>
    <span class="date">{{article.published_on | date: "%b %d"}}</span>;
<span class="author">{{article.author.first_name}} {{article.author.last_name}}</span>
</div>

In the example above we want to let the user select the color of the box where article title and link are displayed. Users’ choice will be placed as a class name, and in our css we will create different properties for each choice.

First we need to declare our dropdown with {% dropdown-Select_Color {"Red" : “red”, "Blue" : “blue”, "Purple" : ”purple”}%}.

  • dropdown - liquid tag for generating dropdown
  • Select_Color - label of our dropdown
  • {"Red" : “red”, "Blue" : “blue”, "Purple" : ”purple”} - key : value pairs that will populate the options in the dropdown. Key will be shown to the user and value will be stored where the dropdown is referenced

Next in the code div class=”{{dropdown-Select_Color}} we are referencing the dropdown we declared. When rendered in html this is where the value of the selected key will be placed.

If the user selects Purple when configuring the widget, below code will be rendered in the html:

<div class=”purple”>
    <h1><a href=”http://article-link.com”>Article no. 1</a></h1>
    <span class="date">Dec 29.</span>
<span class="author">John Doe</span>
</div>

structured

structured is a tag that makes a widget nestable. This means that in the page/layout editor widget will accept child widgets to be placed within and rendered in the position where {{structured}} tag is placed.

Example usage:

Structured widget:

<section class=”social-links”>
    <p>Connect with us</p>
    {{structured}}
</section>

Social links widget:

<a href=”{{simple_string-Facebook_URL}}” class=”social facebook”><i class=”facebook-icon”></i></a>

When the Structured widget is added to the page/layout editor, and Social links widget added as a child, code below will be rendered in the html:

<section class=”social-links”>
    <p>Connect with us</p>
    <a href=”http://facebook.com/unroole” class=”social facebook”><i class=”facebook-icon”></i></a>
</section>

text

text tag is used to generate a rich text editing field in the widget blueprint and display it with proper formatting on the page/layout. Besides adding content, user can set html attributes to the wrapping div of the content such as id and class.

Sample usage:

<div class=”greeting-text”>
    {{text-Greeting_Text}}
</div>

If the user was to enter the paragraphs with the following formatting to the widget, it will be rendered with proper html tags:

Lorem ipsum dolor sit amet

Consectetur adipiscing elit. Vivamus vehicula fermentum condimentum. Suspendisse sed posuere dui. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

  • Vivamus eu elit velit.
  • Maecenas eget turpis et ante eleifend luctus at eget dui.
  • Integer tellus ante, congue non justo quis, mollis cursus eros.

Etiam porttitor dignissim felis sed ultricies. Nunc rhoncus suscipit consectetur. Mauris nec laoreet metus, a congue dui. Sed accumsan, lorem nec iaculis congue, sem ipsum vulputate quam, quis venenatis ante erat sit amet augue. Nulla tempus maximus magna in pulvinar.

Code rendered in the html:

<h1>Lorem ipsum dolor sit amet</h1>
<p>Consectetur adipiscing elit. Vivamus vehicula fermentum condimentum. Suspendisse sed posuere dui. <strong>Class aptent taciti sociosqu</strong> ad litora torquent per conubia nostra, per inceptos himenaeos. 
<ul>
    <li>Vivamus eu elit velit.</li>
    <li>Maecenas eget turpis et ante eleifend luctus at eget dui. </li>
    <li>Integer tellus ante, congue non justo quis, mollis cursus eros.</li>
</ul>
Etiam porttitor dignissim felis sed ultricies. Nunc rhoncus suscipit consectetur. Mauris nec <a href=”#”>laoreet</a> metus, a congue dui. Sed accumsan, lorem nec iaculis congue, sem ipsum <em>vulputate quam</em>, quis venenatis ante erat sit amet augue. Nulla tempus maximus magna in pulvinar.</p>

code

code tag is used to add various code snippets to your widget blueprint. In widget blueprint this tag will generate dropdown to select the code type (text, javascript, css, json, ) and code editor to add the code.

Sample usage:

{{code-Font_Call}}
{{code-Alternate_CSS}}
<p class="new-font">This paragraph will be displayed with New font added</p>

The widget above, when added to a page/layout will have two sections, Font call and Alternate CSS. Each section generated with the {{code}} has a dropdown to select the type of the code and code editor with syntax highlighting. If the user was to add to the Font Call code, and .new-font { font-family: 'Roboto', sans-serif;} to the Alternate CSS, following would be rendered in the html:

<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<style>.new-font { font-family: 'Roboto', sans-serif;}</style>
<p class="new-font">This paragraph will be displayed with New font added</p>

Paragraph would be displayed with Roboto font.

Tags Glossary

Troubleshooting

Why is my page blank (white)?

There are several reasons why your page could be blank. Below is a quick checklist:

  • Is your page scheduled before the current time? If it’s scheduled in the future, you should be using Time Preview to see it.
  • Does your page use a Layout that is not scheduled? If it’s set to default Layout, is there a working Layout scheduled?
  • Does your page have content?
  • Is the correct version of your page scheduled?
  • Is the correct Theme scheduled?
  • Do you have a Page set as your homepage? To set a page as your homepage, delete its permalink so that the root of the website will display said Page.

How do I put my site live?

Your site is live if you can can preview it from unroole Core by clicking “View website” button in the top right corner. If you cannot see anything, chances are that part of your website are not scheduled. Please see Why is my page blank?. To set up a vanity domain, please refer to How do I link my DNS name?.

How do I load external resources, ie. Google fonts, google hosted scripts, google API calls?

To add external resources to a website follow the steps below:

  • Go to Channel
  • Click on Layouts in sidebar
  • Edit the layout which will hold said resource.
  • In the Widget Tree, locate the Header widget.
  • Select the Header widget and click the “New” action to create a widget inside the header.
  • In the System Widgets category, choose the Code widget.
  • Once created, select your code widget.
  • Set the code type to html.
  • Write your reference code in the editor. For example:
     <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
  • Save your changes.

This resource will now load on every page of your website. To limit the resource to just the Page, add a HTML Header widget to your page. It will append page header content to the webpage header content when it is rendered.

Make sure that your references are from secure URLs to avoid conflict between secure pages and unsecure resources.

Why are some of my navigation items missing?

Navigation items don’t appear if the page they are pointing to isn’t scheduled. This is done so that you don’t have to change your navigation as you’re scheduling and removing pages. Basically, if the Page is not there, the corresponding Navigation Item will not display.

How do I link my DNS name (http://example.com) to my unroole site?

To associate a name with your Channel, and to gain the ability to set up subdomains, follow the steps below:

  • In your domain register add 'cloud.unroole.com' to cname record of your domain
  • Go into your channel and click Properties in the settings panel of the sidebar.
  • In the Domain Control panel, click the little blue pencil in the tab.
  • Click “Add Domain”.
  • Fill in the information.
  • Set your entry to active.
  • Click save changes
  • Allow 24 hours for propagation (time varies).