Layouts and Includelets

The layout functionality of dotCommunity's CMS controls the structure of your pages. It allows you to select from a variety of different sets of regions for adding text and rich content to your website pages.

For example you can choose between a single large area covering the page for content, or a 2 column layout. The layout CMS tab also allows to add "Includelets" to your page.

The Layout CMS Tab

To modify the layout a page is using or the includelets on a page you need a non published revision to work on. Therefore if the most recent version of your document is live, click the Create new revision to make changes link.

Editing Page Layouts

At the bottom of the Layout CMS sub-tab is a section entitled Current Template listing the layout you are currently using. Click the change button (1 in the diagram) to display a new page offering you the chance to change the layout. To use a new template select the radio button corresponding to the layout you would like to use and click Save. You will then be returned to the Layout CMS sub-tab with the available set of slots for includelets will reflect your new layout.

Managing Includelets

Includelets are automatically generated dynamic snippets of information displayed on a content page. They can be used to help keep a dotCommunity website active and interesting while often requiring no maintenance from the administrator. Includelets are placed and stored within the regions, called "slots" (2), of a page.

The diagram shows an example page with a number of slots defined. The slots entitled Scratch and Trash (3) are special and are not displayed on the public pages. Scratch is available to store includelets that you have configured and would like to store but not use on the currently live page, and all includelets placed here will be stored permanently. The trash slot should be used to remove an includelet from your page. When you navigate away from the Layout sub-tab any includelets in the Trash slot will be permanently deleted.

When viewing the layout sub-tab any includelets displayed in grey cannot be modified, while includelets that are white are available for editing. An includelet can be grey for 2 reasons:

  1. The latest version of the current page is published in which case all includelets are unavailable for editing.
  2. The includelet is inherited from a page higher in the page hierarchy.

Adding Includelets

To add an includelet click the add includelet link (4) for the slot you wish to add it to. You will be presented with a list of available includelets, which you select by clicking on them.

The available includelets, with their options and use are:

  • Child List - This creates a clickable bullet list of the content pages below the page you are currently editing.
  • Comments - Use this includelet to add the accept comments here link on a page. The viewing user also needs to have permission to create a comment otherwise it won't show you the link on the public page.
  • Community admin links - This displays the manage website and manage content links if you are a user with suitable permissions. 
  • Community calendar - This shows your events calendar if you have enabled the calendar application
  • Community forums - This includelet shows you a synopsis of forums in your website. It won't do anything if you don't have any forums to show.
  • Community information - This includelet can automatically place variables from your website information data such as address and contact details within a page. The contents on this includelet will automatically be updated when you update your website details in the Site Settings tab.
  • Community Surveys - This includelet shows you a synopsis of surveys in your website. It won't do anything if you don't have any surveys to show.
  • Contact Email - This allows you to create your own customised "contact us" pages. You can create as many as you want for different uses. Options:
    • Email address - the email address that comments will be emailed to when the form is filled in, this is not visible to the people filling in the form.
    • Email subject - the subject line of the email that is sent (the user who fills in the form never sees this - only the receiver of the emails)
  • Content item - This includelet determines where your website will display the content from the default Edit sub-tab of the current page. You must not delete this else your page will appear blank. However you can use it to position it on your page among other includelets
  • Custom - The custom includelet allows you to insert rich text into the page with the same capabilities as the Edit sub-tab.
  • Featured site - This includelet highlights a website from a predetermined list on the page.
  • Filtered Item List - This is a highly configurable includelet to show bulleted lists of content pages from your site. Options:-
    • Section - Which folders(s) would you like to pull items from? You can add more than one section to the list. If you leave it blank it uses pages below the page on which you place the includelet.
    • Content type - Filters the list of results displayed in the includelet to just the type specified. For example it can be configured to show only pages of type "news story".
    • Search string - this filters the list of results displayed in the includelet on a search of the words in the content. E.g. add the word "banana" to get only pages relating to bananas. The search system uses a "fuzzy match" of the word - so searching for "drive" would find "driver, driving, drives" etc.
    • Publish start/end date - a date range for when the article was published. It uses midnight on the day specified, so for example if you selected 21/07/2009 as the start date and 22/07/2009 as the finish date then you get pages from between midnight on the 21st and midnight on the 22nd.
    • Publish min/max age - a period of time to filter the displayed results by. E.g., if you select "1 day" as the maximum age it'll show only articles published in the last 24 hours. If you select "1 day" for the minimum age it'll show only articles published over 24 hours ago.
    • Display mode - whether to display only the title, the teaser (including thumbnail image), or the full item.
    • Extra Display Options - some extra optional bits of info that can be shown with the listing. e.g., the average star rating.
    • Sort order - determines the order the results are displayed. Please note that if you order by rating only pages that have a rating will be returned.
    • Present links to allow the user to sort results - if you select "yes" then when you view the page there will be buttons to order by name, date, rating, and popularity. This will override the order which you select in the "Sort order" option.
    • Limit - the number of results to return in the list. Supplying a value of 0 will result in unlimited results.
    • List mode - specifies whether you want the results in a list, a list with numbers, or just a plain presentation.
    • Forums - shows recent posts from your forums, as well as those in communities you are shared with. Options:
      • Which Communities to use - select which communities you are interested in. Either just this website, communities you are shared with, or communities which are "below" you in the hierarchy, or combinations of those.
      • Type - Hot Topics lists the topics that have had the most posts in the last month. Latest Threads and Latest Posts act as you would expect.
      • Limit - The number of forum posts to show in the list. Supplying a value of 0 will result in unlimited results.
  • Free website - this displays the clickable ‘free website' text which can be used if someone would like their own website website.
  • Latest News - this includelet can be used to display items from your News entries within various time periods or in most recent or least recent order.
  • Poll - can be configured to show different polls you may have added and have a time limit set for it to be available. The poll module must be enabled before this includelet will function.
  • Random item - this will display any random CMS item or a specific item if you choose it. Options:
    • Item - if selected this item will be displayed rather than a random one
    • Display mode - whether to display only the title, the teaser (including thumbnail image), or the full item
    • Content type - if the includelet is configured to display a random page, it will only choose pages of this type
  • Ratings - for further information setting up ratings please read the Ratings section
  • Related Items - this includelet displays any related items, if applicable. For more information on relating content pages please see the Relations section.
  • Shared Communities - This shows a list of communities that you're shared with, if there are any. Options:
    • Title - A title for the includelet in the page it is to be used.
    • Limit - an optional limit to the number of communities to show. 0 for unlimited
  • Site Map - This includelet inserts a clickable site map (link by link list) into the page. Each entry in the Site Map is shown with the number of pages below it in the tree.

Once you have selected you will be shown the configuration options for that includelet. After configuring the includelet it will be added to the specified slot (5).

Editing Includelets

If you would like to modify an existing includelet you must first make sure it is editable by checking that the includelet is coloured white in the layout CMS tab. You then double click the includelet to open it's configuration options.

In the case of the Custom includelet, double clicking displays the WYSIWYG editor to allow you to modify the content.

Moving Includelets on the Page

If you would like to move an includelet up and down within the order of the includelets in the specific slot, or move it to another slot entirely just select the includelet by holding down the mouse button and drag and drop it where you would like it by letting go of the mouse button. While dragging the includelet a red line indicates where the it would be placed if you release the mouse button.

Ratings

To allow a page to be rated you need to select Accept ratings on that page in the CMS.

You also need to have the "Ratings" includelet on the page somewhere - this is where the ratings will appear when the page is viewed

When a user rates an item, the comments must be approved by the admin before they are visible to other users. To approve/delete/etc ratings select "Ratings" in the content tree in the admin interface.