“Lemonstand App” CMS objects

This article is the first in the “Lemostand App” series aimed at developers and content curators, covers LemonstandApp’s CMS terminlogy and how it’s used.

All definitions are based on their extensive documentation that can be found here.

CMS objects:

  1. Page – contains folders corresponding website pages
  2. Template – Contains templates, corresponding templates
  3. Partial – Contains files, corresponding partials

Templates and Partials are actually files in their corresponding folders, while pages are
represented with folders in the pages folder since each page requires more than a single file.

Managing Templates

Template files can be created either via the CMS section in the Admin panel or via text editor and should have the .htm extension. If the files have been created from the admin panel then the file extension is set from the “Content File Extension” field.

Since you can create and edit templates via the Admin Panel and by manipulating templates directly you should decide from the start which approach you’ll use.

Editing file names via Admin panel renames the actual files while renaming the files directly LemonstandApp detects that change and creates a new object thus you’ll have to delete the “old” one manually.

This suggests that you should do your renaming/creating/deleting from the Admin panel or just remember which ones you’ve changed and then delete them to avoid cluttering. Your call…

Managing Partials

All of the above applies with one exception and that is the colon (:) symbol for
partials when saved in the database and the semicolon (;) symbol when saved as
a file.

Example: shop:product_list or shop;product_list

Managing Pages

As mentioned, pages are represented with folders to accommodate all the dependent files needed. Which are:

page_[name].htm (.php)

Contains the actual page content and the name of this file needs to have the “page_” prefix while the extension for this file depends on the Content file extension field of the file-based templates configuration form.

head_declarations.htm (.php)

Contains the page head declarations which are used for page-specific HEAD declarations

pre_action.php

Contains the PRE action code

post_action.php

Contains the POST action code

ajax_handlers.php

Contains custom page AJAX handler definitions.

Content Blocks

Content blocks are defined as needed in a page and are represented with HTM files
that have a content_ prefix.

“For example, if you have a content block with the intro code, it will be represented with the content_intro.htm (or .php) file in the page directory. You can create new content block files manually. LemonStand will automatically discover them as soon as you render them on the page. Content block file names can contain only latin characters, numbers and underscores.
If your page contains any page blocks, they are represented with HTML files with the block_ prefix. For example, if you have the head block, it will be represented with the block_head.htm (or .php) file in the page directory. You can create page block files manually. LemonStand will discover them as soon as you render them on the page. Page block file names can contain only latin characters, numbers and underscores.” [ref]

Page creation

If you create pages outside the Admin panel LemonstandApp you’ll need to use the “Create page from files” button in the admin panel to make them “recognized” by the system. Here you can specify the URL and the title for the page.

The right way to handle CMS objects is to use the CMS Export/Import feature from the
Admin panel.

One last important thing:

File-based template mode and CMS Export/Import operations

“The file-based templates feature cannot replace the CMS Export/Import operations, because files do not contain all pages information. For example, in files you cannot specify a page URL, its security settings or visibility for different custom groups. If you need to copy CMS objects to another server, the best way to do it is the CMS Export/Import feature.” [ref]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>