LunpaCMS generates webpages through the use of templates; and Template Manager organizes and edits those templates to make your vision of your website a reality.
NOTE: Template names are VERY important. They should be precise and self-describing, as they show in page URLs and in web page title in page headers. Abbreviated template names can cause confusion and lose search results. Use underscores for spaces.
Template listing shows all templates available in the system including deleted templates. You can filter templates by their attrinutes such as on/off sitemap, locked status, admin only status, or by category. Template listing provides template edit, copy, delete, locked status change, and live view links for each template.
There two ways to edit a templates: using Template Manager web interface and using lunpavi.pl from Linux prompt. All template attributes can be edited through web interface, but only template contents can be edited through lunpavi.pl.
LOCAL_NEWSMANAGER_ENABLE_WYSIWYG_EDITOR = 1
),
and Ace IDE (An embedded editor with syntax highlighting and tag matching) modes
are provided. When using plain text mode, edits are made using plain text, HTML, Javascript, and CSS.LOCAL_NEWSMANAGER_ENABLE_WYSIWYG_EDITOR
to 1 in
Map Manager.
Common editor functions are documented here.
Lunpavi also keeps track of the templates you have recently edited. To see which templates were edited last use ./lunpavi.pl show-recent
Template Manager enables the use of friendly URL for better SEO support. Friendly URL will be better understood by search engines. Default template page URL shows in the following format:
http://<site_domain>/base.cgim?template=<template_name>
However, if LOCAL_TEMPLATEMANAGER_USE_FRIENDLY_URL
map is set to 1, the page URL will show as:
http://<site_domain>/template/<template_name>/
To enable friendly URL:
# FRIENDLY URL REDIRECT
RewriteCond %{REQUEST_URI} ^\/template\/
RewriteRule (.+)$ base.cgim [L]
LOCAL_TEMPLATEMANAGER_USE_FRIENDLY_URL
map to have value 1.Template Manager allows users to enter meta title, description, and keywords for each template. If metadata is defined, LunpaCMS shows defined metadata in template header when the template page shows. If no metadata is defined, LunpaCMS will get it through auto meta feature.
Template locking is used to prevent a template from being edited by multiple users at one time. When a user opens a template from web interface or lunpavi.sh, the template is locked and no other users can be able to open it for editing. Also, when a user tries to save a template, LunpaCMS checks if the template was opened by the user who tries to save it, and allows saving onyly when it is true. A template's lock status can be change by status change links in template listing any time. If the locked status of a template is changed on purpose by another administrator while being edited, the original person who opened it for editing cannot save changes. LunpaCMS shows an alert message for this conflict.
Templates can be called from within templates. You can thus have a template with templated subsections. These subsection templstes are called by using the LunpaCMS code of :::TEMPLATE:<template name>:::
. This simply inserts the child-template into the parent-template at the location where the code is called.
For example:
ParentTemplate
This is a test<br> :::TEMPLATE:ChildTemplate1::: :::TEMPLATE:ChildTemplate2::: This is a test
ChildTemplate1
ChildTemplate1 Test<br>
ChildTemplate2
ChildTemplate2 Test<br>
Will result in the following:
This is a test<br> ChildTemplate1 Test<br> ChildTemplate2 Test<br> This is a test
Templates can also be called with arguments, such as :::TEMPLATE:TEST:ARGS: test1=test&test2=TEST :::. This is especially nice when you have a template that only needs a few minor tweaks when it is called. The arguments passed to the template are then called within the template by using :::template_args_<variable>:::. Using the earlier example, :::template_args_test1::: will output "test" and :::template_args_test2::: will output "TEST".
As a further example:
ParentTemplate
This is a test<br> :::TEMPLATE:ChildTemplate:ARGS: color=blue&name=Jason ::: <br> :::TEMPLATE:ChildTemplate:ARGS: color=red&name=Thomas ::: <br> This is a test
ChildTemplate
If only :::template_args_name::: wore :::template_args_color::: shirts.
Will result in the following:
This is a test<br> If only Jason wore blue shirts. <br> If only Thomas wore red shirts. <br> This is a test
The following are a list of some LunpaCMS codes that are relevant to add to a template to get various functionality with the various LunpaCMS code
#VARIOUS HEADING AUTOMATION
:::HEADING:(.*):LEVEL:(.*):::
- This LunpaCMS code does the following.
:::HEADING:(.*):::
- This LunpaCMS code does the following.
#TEXT BOX AUTOMATION
:::TEXT_BOX_START:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::TEXT_BOX_END:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#LINKS
:::URL:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::LASTURL:::
- This LunpaCMS code does the following.
#RADIO BUTTONS, CHECKBOXES & SELECT BOXES
:::CHECKBOX:VARIABLE:(.+):DEFAULT:(.+):::
- This LunpaCMS code does the following.
:::RADIO:VARIABLE:(.+):VALUE:(.+):DEFAULT:(.+):::
- This LunpaCMS code does the following.
:::SELECT:VARIABLE:(.+):TAG:(.*):FUNCTION:(.+):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::SELECT:VARIABLE:(.+):TAG:(.*):FUNCTION:(.+):::
- This LunpaCMS code does the following.
:::ENHANCED_SELECT:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::DATE_OF_BIRTH_SELECT:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::DATE_OF_BIRTH_SELECT:::
- This LunpaCMS code does the following.
#VARIABLES FOR LINK AUTOMATION
:::CARRYOVERVARS:::
- This LunpaCMS code does the following.
:::CARRYOVER(_VARS|VARS_FORM):::
- This LunpaCMS code does the following.
:::CARRYOVERVARS_FORM_LOGIN:::
- This LunpaCMS code does the following.
#HTML TABLE BOX AUTOMATION
:::BOX_BOTTOM:::
- This LunpaCMS code does the following.
:::BOX_TOP:TITLE:([^:]*):WIDTH:([^:]*):BODYPADDING:([^:]*):::
- This LunpaCMS code does the following.
:::BOX_TOP:WIDTH:([^:].*):TITLE:(.*):CELLPADDING:(\d*):::
- This LunpaCMS code does the following.
#TEMPLATE INFO
:::TIMESTAMP:::
- This LunpaCMS code does the following.
#USERMANAGER
:::COOKIE_TEST:::
- This LunpaCMS code does the following.
:::USERNAME:::
- This LunpaCMS code does the following.
:::IS_LOGGED_IN:::
- This LunpaCMS code does the following.
#TIME/DATE
:::(DATE|TODAY):::
- This LunpaCMS code does the following.
:::PRETTY_DATE:::
- This LunpaCMS code does the following.
:::PRETTY_DATE:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::TIME:::
- This LunpaCMS code does the following.
:::PRETTY_TIME:::
- This LunpaCMS code does the following.
:::DATE:FORMAT:(.+):::
- This LunpaCMS code does the following.
:::CURRENT_YEAR:::
- This LunpaCMS code does the following.
#ORDERMANAGER
:::ORDER_PRINT_ITEMS:::
- This LunpaCMS code does the following.
:::ORDER_PRINT_RECEIPT:::
- This LunpaCMS code does the following.
:::ORDER_BILLING_ADDRESS:::
- This LunpaCMS code does the following.
:::ORDER_SHIPPING_ADDRESS:::
- This LunpaCMS code does the following.
:::ORDER_CC_NUM:::
- This LunpaCMS code does the following.
:::ORDER_CC_NUM_PRINT:::
- This LunpaCMS code does the following.
:::STATUS_SELECT:::
- This LunpaCMS code does the following.
:::STATUS_CHANGES:::
- This LunpaCMS code does the following.
:::ORDER_DATE:::
- This LunpaCMS code does the following.
:::ORDER_TIME:::
- This LunpaCMS code does the following.
#ITEMMANAGER
:::ITEM_QUANTITY_CODE_SELECT:::
- This LunpaCMS code does the following.
:::ITEM_PARENT_SELECT:::
- This LunpaCMS code does the following.
:::ITEM_CATEGORY_SELECT:::
- This LunpaCMS code does the following.
:::ITEM_TEMPLATE_MANAGEMENT:::
- This LunpaCMS code does the following.
:::ADMIN_SHOW_ITEM_IMAGE:::
- This LunpaCMS code does the following.
:::PRINT_IMAGE:::
- This LunpaCMS code does the following.
:::PRINT_IMAGE:(.*):::
- This LunpaCMS code does the following.
:::FRONT_ITEM_LARGE:(.*):::
- This LunpaCMS code does the following.
:::GET_CATEGORIES:::
- This LunpaCMS code does the following.
#SHOPPINGCART
:::CART_PRINT_ITEMS:::
- This LunpaCMS code does the following.
#NEWSMANAGER HEADLINES
:::HEADLINES:(.*):FORMAT:(.*):::
- This LunpaCMS code does the following.
:::HEADLINES:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::HEADLINES:(.*):::
- This LunpaCMS code does the following.
#NEWSMANAGER IMAGE NEWS BLOCK
:::NEWSMANAGER_IMAGE_NEWS_BLOCK:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#EVENTS
:::SHOW_EVENTS:(.*):FORMAT:(.*):::
- This LunpaCMS code does the following.
:::SHOW_EVENTS:(.*):::
- This LunpaCMS code does the following.
#ADMIN_MENU
:::ADMIN_MENU:::
- This LunpaCMS code does the following.
:::ADMIN_MENU:ARGS:\s+type=(.*)\s+:::
- This LunpaCMS code does the following.
#CONTECT MANAGEMENT SUITE COPYRIGHT
:::COPYRIGHT_NOTICE:::
- This LunpaCMS code does the following.
#PHOTO MANAGER
:::PHOTO_DELETE:([^:]*):::
- This LunpaCMS code does the following.
:::PHOTO_MOVE:([^:]*):::
- This LunpaCMS code does the following.
#NEWS MANAGER
:::IMAGE:newsmanager_random:(\d+) :::
- This LunpaCMS code does the following.
:::NEWSIMAGE:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::NEWSIMAGE:(.*):::
- This LunpaCMS code does the following.
#IMAGE RESIZE/BORDER ENGINE
:::IMAGE:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::IMAGE:(.*):::
- This LunpaCMS code does the following.
#PNG MATTING
:::MATTEPNG:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#STANDARD MESSAGE
:::MESSAGE:(.*):ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::MESSAGE:(.*):::
- This LunpaCMS code does the following.
#DEMO OF ALL FONTS AVAILABLE TO SYSTEM
:::FONT_?DEMO:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::FONT_?DEMO:::
- This LunpaCMS code does the following.
#DEMO OF IMAGE PROTECTION HALO
:::HALO_?TEST:::
- This LunpaCMS code does the following.
:::HALO_?TEST:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#SCREENSIZE TEMPLATE NEEDED
:::SCREENSIZE:::
- This LunpaCMS code does the following.
#CREDIT CARD LOGOS
:::CREDIT_CARD_LOGOS:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#FILE LISTER
:::FILE_LISTER:(.*):::
- This LunpaCMS code does the following.
#CONTACT_MANAGER
:::CONTACT_MANAGER_SET:(.*):::
- This LunpaCMS code does the following.
:::PHONE_TYPE_SELECT_BOX:([^:]*):::
- This LunpaCMS code does the following.
:::CONTACT_NUMBER_BLOCK:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::CONTACT_ADDRESS_BLOCK:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#CAPTCHA IMAGE VERIFICATION
:::CAPTCHA:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::CAPTCHA:::
- This LunpaCMS code does the following.
#REGISTRATION MANAGER
:::REGISTRATION_LIST:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::REGISTRATION:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::REGISTRATION_PAYMENT_OPTIONS:::
- This LunpaCMS code does the following.
:::REGISTRATION_TICKET_QUANTITY:::
- This LunpaCMS code does the following.
:::REGISTRATION_ADMIN_AUTOFILL_LIST:::
- This LunpaCMS code does the following.
:::REGISTRATION_TICKET_PRICE:::
- This LunpaCMS code does the following.
#STORE MANAGER
:::STORE_LOCATOR:::
- This LunpaCMS code does the following.
:::STORE_LOCATIONS:::
- This LunpaCMS code does the following.
:::STORE_LOCATOR_GOOGLE_API_CODE:::
- This LunpaCMS code does the following.
#EMPLOYEE MANAGER
:::EMPLOYEE_MANAGER_MAIN:::
- This LunpaCMS code does the following.
:::EMPLOYEE_MANAGER_RANDOM_MINI_BIO:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
#NEWSLETTER MANAGER
:::NEWSLETTER_ARCHIVES?:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::NEWSLETTER_SUBSCRIBE_FORM:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::NEWSLETTER_SUBSCRIBE_FORM:::
- This LunpaCMS code does the following.
#MEMBERSHIP MANAGER
:::MEMBERSHIP_BALANCE:::
- This LunpaCMS code does the following.
:::MEMBERSHIP:::
- This LunpaCMS code does the following.
:::MEMBERSHIP:PAYMENTFIELD:(.*):::
- This LunpaCMS code does the following.
#PAYPAL MANAGER
:::PAYPAL:::
- This LunpaCMS code does the following.
:::PAYPAL:(.*):::
- This LunpaCMS code does the following.
#META DATA
:::META_TITLE:::
- This LunpaCMS code does the following.
:::META_KEYWORDS:::
- This LunpaCMS code does the following.
:::META_DESCRIPTION:::
- This LunpaCMS code does the following.
#COLOR MANAGER
:::PALETTE:ARGS:\s+(.*)\s+:::
- This LunpaCMS code does the following.
:::PALETTE:::
- This LunpaCMS code does the following.
The FCK Editor is a "what you see is what you get" (WYSIWYG) alternative editor, supported by Template Manager.When enabled by the LOCAL_TEMPLATEMANAGER_ENABLE_WYSIWYG_EDITOR
map, the FCK Editor can be used to edit almost any template.
A key part of the FCK Editor functionality is that all opening HTML tags are "matched" with respective closing tags. LunpaCMS depends on unmatched tags in templates like main-begin
and main-end
to form the "bread" surrounding the main content of a webpage "template sandwich". FCK Editor is automatically disabled for such templates to prevent inadvertent damage to a website's layout.
Ace is an embedded javascript code editor integrated into the LunpaCMS Template Manager and News Manager.
To enable this editor option, set the LOCAL_TEMPLATEMANAGER_ENABLE_WYSIWYG_EDITOR
map to 1,
and click "Ace IDE" in a template's contents field. Default syntax highlighting is HTML,
with 'css' being set automatically if a template starts with the string 'css'. Editor options
are available by pressing Ctrl+Comma
or Command+Comma
, but note that these
options are not persistent and will be reset on the next page load. Template saves
can be triggered by pressing Ctrl+Enter
. Further
keyboard shortcuts are documented by Ace.
Links to share pages on a site powered by LunpaCMS can be easily done by adding the :::SOCIAL_MEDIA:::
tag where you want the links to show up on the template. LunpaCMS tracks all of the clicks on these links to various social media sites. Admins can access the statistics by going to the template manager admin page and clicking on "Template Statistics." On this page, the statistics for each sharing method as well as collectively can be viewed.
When users use the links generated by the :::SOCIAL_MEDIA:::
tag, LunpaCMS keeps track of the statistics. To access these statistics, navigate to the admin page, then to Template Manager and click on "Template Statistics." From there, the statistics can be sorted by type of sharing, or by time period.
You can enable comment feature on your templates by adding the :::TEMPLATE_COMMENTS::: tag to the place you want it to show.
By default, all template comments require moderation process before they are allowed to be posted on the site. To moderate comments, go to the Template Manager Admin page, click "Moderate Comments" and review the comments to moderate. In order to skip moderation, set the LOCAL_TEMPLATEMANAGER_COMMENT_AUTO_APPROVE map to 1, and comments will be posted as soon as they are entered.
Copyright © 2024 Peregrine Computer Consultants Corp. All rights reserved.
About Lunpa, our mascot. Her mother was a hamster and her father was an ill-tempered Chilean M00se. Oddly, neither smelt of elderberries. The artist is Jennifer Lomax. |
Add Your Comment