Frequently Asked Questions

CMS - Frequently Asked Questions

What is a Document?

It's a webpage or a container for modules.  Read More.

What is a Chunk?


Chunks are blocks of HTML that can be used again and again, they are also used for holding blocks of HTML used by snippets.

Chunks can also be passed values for placeholders when they are rendered, by doing so the designer can choose the formatting while letting the end user create the content. Consider the following chunk which we will name test:


It has two placeholders which can be set when the chunk is called e.g.

[[$test &section=`Section 1` &body=`This is the copy to show in section 1`]]
[[$test &section=`Section 2` &body=`This is the copy to show in section 2`]]

Then the output would be:

<h2>Section 1</h2>
<p>This is the copy to show in section 1</p>
<h2>Section 2</h2>
<p>This is the copy to show in section 2</p>

If the output format needs changing then it is simply a matter of updating the chunk.

As with snippets chunks can come from different sources, installed modules, part of the core system and those you create yourself.

Note: Chunks that you create yourself within the manager interface override chunks from any other source with the same name.


What is a Snippet?

A snippet is a short piece of PHP which performs some operation and outputs the results to the page, like placeholders snippets may be included in the cached page data or uncached so they are run on each page view.

Snippets come in three flavors; those are part of the core system, those that are provided by modules and those that you write yourself.

Note: Snippets that you create yourself in the manager override snippets of the same name from any other source.

Snippets can be passed parameters in the form &name=`value`, the following examples show the possible formats:

[[test]] - Cached snippet
[[!test]] - Uncached snippet
[[test &item=`123`]] - Cached snippet being passed a value
[[module.snippet]] - Cached snippet from a specific module
[[test &value=`12` &value2=`45` &value3=`67`]] - Multiple parameters

When a snippet is called it is passed $tplEngine which is the instance of cfTemplateEngine running the template and all parameters passed in the call are converted to PHP variables.

What is a Template?

It's a block of HTML that defines the page layout.

What is a Stylesheet (CSS)?

A web stylesheet (CSS - Cascading Style Sheet), defined as ".css", is a form of separation of presentation and content for web design in which the markup (i.e., HTML or XHTML) of a webpage contains the page's semantic content and structure, but does not define its visual layout (style). Instead, the style is defined in an external style sheet file (.css) using a style sheet language such as CSS or XSLT.

What is a Javascript (JS)?

An object-oriented computer programming language commonly used to create interactive effects within web browsers.

What is a LESS?

Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themeable and extendable. (.less)