Dialogs Framework Basic Concepts

Dialogs Feature: Settings

Updated: 21 Apr 2023


Dialogs Settings define constant variables that are available to Dialogs templates and functions. Several settings are pre-defined when Dialogs is installed, and the developer can add additional settings as needed.

Settings - v.8

Site Settings as Dialogs Constants

Dialogs v.8 introduced a new interface for content managers to use in accessing the settings most relevant to the daily management of a site. This is accessed at Edit Site Settings under Setup in the Dialogs back end. These are organized into groups:

  • Website Settings include the site/company name, domain, default meta data (used when page-specific data is not entered), and a spot for entering and managing any analytics code that needs to be inserted into the page templates.
  • Email Settings is where default email addresses are managed, as well as an email signature that can be used on outgoing email.
  • Social Networks take URLs for the most common networks. The page templates can be set up to display these if present. (The default page template that ships with Dialogs shows these in the footer area, using the equivalent Font Awesome icons.)
  • Website Images & Icons include logos for front-end and back-end use, favicons, images that can be inserted into pages for social network sharing use, and bookmarking icons.

At the top of the Site Settings page is a link to the Manage Settings page, where you can manage other settings that don't show up in the Site Settings page, or create new settings to show up with Site Settings.

  • All settings must have a name (the Setting field), and a value.
    • Settings that are to appear on the Site Settings page should also have a Category of Site Settings, a Type, and should be assigned a Position following the protocol used on other settings that appear in Site Settings
  • Call a setting from within a page or list template using:
    $this->foo
  • For security reasons, you can't directly access the setting from within a list field (such as body or sidebar) but you can access it indirectly through a list template.
    • create a list template list_setting_foo. that calls the Settings list KDlst_config
    • set limit to 1
    • instead of $row[] use $this->foo to call the value in the item detail
    • include this list_setting_foo. in body or sidebar or wherever.

Settings - v.7

Create a setting to behave as a "Dialogs constant"

Access Settings under Setup in main Dialogs sidebar menu.

  1. Name it "foo" and it's value can contain full html if you like.
  2. Call it from within a page or list template like this:
    $this->foo
  3. For security reasons, you can't directly access the setting from within a list field (such as body or sidebar) but you can access it indirectly through a list template.
    • create a list template list_setting_foo. that calls the Settings list KDlst_config
    • set limit to 1
    • instead of $row[] use $this->foo to call the value in the item detail
    • include this list_setting_foo. in body or sidebar or wherever.

 

Next: Dialogs Feature: Tags (Keywords)

LinkedInFacebookYouTubeTwitter