This is the documentation for LemonStand V1, which has been discontinued. You can learn more and upgrade your store here.

LemonStand Version 1 Has Been Discontinued

This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.

Creating Editable Blocks

Editable content blocks allow you to separate your pages HTML code and pages content. You may add any number of content blocks on a page and then edit them separately from the page code, in WYSIWYG or text mode. The benefit of this approach is that page content can be managed by non-technical people. It protects pages from being corrupted by accident and makes page editing simpler.

Let's add a content block into our Hello World page. Open the CMS/Pages page and click Hello World page. Add the following line to the page code:

<? content_block('page_content', "Page content") ?> 
{{ content_block('page_content', "Page content") }}

Function content_block has two parameters - the block code and block title. Block code is used for identifying the content block by the system. The block title is output in the content editing mode above the editor form, as a header. Click the Save and the Close button to return to the page list. Place the mouse cursor over the Hello World record and then click Edit content link in the popup menu.

It will open the Hello World page in the content editing mode. In this mode there is no HTML code editor and other programming-related elements. Enter any text to the editor and click the Save button. The buttons available in the editor are configurable in the System/Settings/HTML Editor Settings page.

Then open the page preview by clicking the page link above the form. You will see your page content with a text you just added in the content editing mode.

In the content editing mode it is very easy to insert images or links to files in the content block using the Files panel. To upload and insert an image, in the Files tab navigate to the folder you want to upload the image to (folders must be previously created on the CMS/Resources page).

Click the Upload files(s) link and select the files that you want to upload. Then click a file in the list and LemonStand will insert it into the content block. If you want to change image size, hold the ALT key when you click the image. That will open the Insert Image popup window where you can specify the image size.

For file types other than GIF, JPEG and PNG LemonStand will insert a link to a file, when you click a file in the file list.

Plain text content blocks

Since CMS version 1.10.0 LemonStand supports plain text content blocks. Plain text content blocks are created with the text_content_block() function. 

Next: Global Content Blocks
Previous: Combining and Minifying JavaScript and CSS files
Return to Getting Started