0%

Custom Site Settings ID: DBT-ODO-CSS

Marketpath CMS has several standard site settings. Some impact site behavior and others are accessible from within templates. You can also define custom site settings that may make it easier for content editors or non-technical users to make changes.

Standard Site Properties

Marketpath CMS Sites have the following standard, pre-defined fields.

  • Site Name - This is a friendly name used only to identify the site with the Manage UI
     
  • Default Domain - read-only display of the current default domain. 
     
  • Site Timezone - default timezone that is used everywhere throughout a site, with the possible exception of calendars and calendar entries.
     
  • Favicon - the icon used in browser tabs. By default, this will be added automatically via automatic_markup.
     
  • Create Session by Default - if checked, site visitors will have a session created automatically. 
     
  • Session Length in Minutes - default timeout of a visitor session before a new session is created
     
  • Default Content Disposition for Documents - this sets the Content-Disposition for newly uploaded documents.
     
  • Editor Stylesheet - the stylesheet selected here will be loaded into the WYSIWYG editor. It will only load top-level CSS, such as P, H1, A, etc. Deeply nested CSS selectors will likely not apply within the editor because it does not inherit parent container CSS.
     
  • Default Meta Description - sets the meta description field if a page has an empty meta description.
     
  • Default Browser Title Prefix - Sets a site-wide browser title prefix. This is not automatically set at this time and must be explicitly used in template code.
     
  • Default Browser Title Suffix - Sets a site-wide browser title suffix. This is not automatically set at this time and must be explicitly used in template code.
     
  • Enable Live Edit Button - toggle to show the Edit button on live websites if the user is logged into Marketpath CMS.
     
  • Default Gallery Template - sets a default gallery template.

Custom Fields

You can add any type of field as a custom site setting. These will all appear after a site's standard properties. 

Custom site settings are useful for a variety of purposes. Perhaps the most obvious purpose is to define content that is re-used across the site without having to define it on each page individually or hard-code it into the template. This makes it easier for content editors to modify it without requiring excessive edits or touching template code.

One of the major benefits of custom site settings is that they can be exported and imported between sites - making templates easier to port between sites. Instead of hard-coding your site-wide values directly into a template you would define a custom site setting. Each setting would be used within its templates and exported along with other site assets.

Example Custom Site Settings

Here are some simple custom site setting examples. There is no best practice recommendation on which you should add, however. What you added is based on you and your content editors preferences.

  • Google Analytics code -  set once for the entire site and add to every page.
     
  • Select your site's main and footer menus -  this may sound simple, but importing your template into new sites will be one step easier and responsibility for switching out menus can pass from the developer to a content editor.
     
  • Set up social options - such as a checkbox list to select which social links you want to display on articles.
     
  • Define social media accounts to pull into the site - such as the twitter or Instagram feed to display on your home page and in your sidebars.

Add Custom Site Settings

To add custom site settings, go to Develop -> Custom Site Settings. Each site setting must have a unique Name. The Name is used when referencing the site setting within templates. Two ways to reference a custom site setting are shown below.

{{ site.settings['some setting'] }}

{{ site.my_setting }}

ProTip: Prefix your site settings using a short "unique" abbreviation that makes sense to you in order to decrease the likelihood that someone else imports a custom site setting onto the site with the same name (eg: there may be multiple "show_twitter" settings, but only one "mjbb_show_twitter" setting).
        


 



Feedback?

Please fill out the form below with your feedback or any questions you may have after working through the "Custom Site Settings" lesson.

Your Name
Email 
Feedback / Questions