Developer Settings: Slug, Layouts, Custom Tools

While not something end-users will likely touch, Developer Settings are important concepts for all Sitemason users to understand. Developers use values assigned in the CMS and template to carry out logic in the template so, for example, your site knows to display a certain layout for the home page, or so the end-user can choose between a two or three column layout for an interior page.


A Slug is a generic term for a unique identifier, often related to the path of a page, that a developer keys off for use in a template. In Sitemason, each slug can only be used once per site, and are often used when unique display of a page is required; like a home page or staff directory where the page type only appears once per website. For example, a developer might assign the slug "homePage" to the tool representing your site's landing page. They would then use something like this to pull in that template file when a visitor lands on the home page:

<?php if ($smCurrentTool->getSlug() == 'homePage') { include('home.php'); } ?> 

A non-developer should not update the Slug unless they've spoken with their site developer and understand how it's being used on their website.


Layouts are similar to slugs, but can be used many times. A Layout is most often assigned to a page by an end-user when creating a new page and choosing how it should be displayed. For example, it's common for a web designer to include full width, two-column, and three-colum interior page views. A developer can setup these Layout options once in Developer Settings, and then an end-user can assign Layouts to new or existing pages from the menu options in Page Settings.

A developer would use similar code to calling the Slug when choosing a template file to include when a Layout is defined for a page:

<?php if ($smCurrentTool->getLayout() == 'twoColumns') { include('interior/two-columns.php'); } ?> 

Custom Interfaces

A key piece to the power of Sitemason is its flexibility for both the display of a website, but also site management through the CMS. Custom Interfaces are used in Sitemason to provide end-users of the CMS a customized view to manage their website displaying only the data and options needed for a given page.

Sitemason has a standard suite of tool types, like News, Gallery, Store, etc. But for specialized pages like Staff Directories or Restaurant Menus there isn't' an out-of-the-box tool to manage those unique page types. Most CMS's would force developers to build a custom application from the ground up to accomplish this task.

Sitemason, comparatively, is flexible enough to handle just about any content types, so instead of building from scratch, developers can simply rework the interface to display the fields necessary for managing your custom page, and nothing else. This provides a clean, intuitive interface for end-users and eliminates the bloat and confusion related to other CMS's who try to be everything to everybody.

From the Developer Settings tab in the Site panel, a developer may setup a number of Custom Interfaces for your website assigning them to page types (like every Gallery tool gets a specific interface), or to a single tool via its Slug. Custom Interfaces are javascript files, and more information and documentation can be found on our Custom Interfaces Developer site.

Have more questions? Submit a request


Please sign in to leave a comment.