A Quick Introduction
Content Management Systems (CMS) typically create pages by sandwiching templates together and sometimes couple database-driven features.
For LunpaCMS, the sandwich is made up of main-begin & main-end templates for the bread and another template as the meat. By doing this, we can remove the content from the main navigation and allow changes to ripple throughout the site.
Some sites also use more sets of templates for sub-navigation pages or for branding. The possibilities are endless.
Logging in to the Admin Site:
- Navigate to http://www.<domain_name>/admin/
- Enter username and password
Deciding Which Template to Edit:
- Navigate in a web browser to the page you wish to edit.
- Look at the URL for the "template=<template_name>" portion. This is the name of the template you want to edit.
- If there is no template parameter, you are likely on a main index page or a splash page!
The index.cgim page usually use a template called index.template
Splash pages will be in either main.template or splash.template.
And, if you use frames, the key template for the main page layout will be in index.template
Using Template Manager to Edit the Template:
- Navigate to Contents > Templates from main menu.
- Scroll down the page until you see the template name you are looking for.
- When you find the template name, click "Edit" icon.
- Additionally, LunpaCMS-specific ":::" tags can be used to automate certain functions, such as headers and images.
- When editing is complete, click the "Save and Close" button to save the changes and finish editing, click the "Save Template" button to save the changes and continue editing, and click "Cancel and Close" button to cancel editing.
- A template may be viewed live using the "View Live" link.
NOTE: Filenames are VERY important. They should be precise, as they are used to create the page headers when they are displayed. Abbreviated filenames can cause confusion and lose search results. Use underscores for spaces.
Renaming a Template:
- Click the "Edit" icon to open the template in the template edit form.
- Change the value of Template Name in the top of the form to the new name.
- Click the "Save and Close" button to save the changes.
Creating a New Template:
- Click the "Add a New Template" from vertical menu to get a new template add form.
- Enter "Template Name" along with other fields in the form.
- Click the "Save and Close" button to save the new template.
- Click the "List Templates" from vertical menu. You will see the template you created from the list.
Deleting a Template:
- Find the template you wish to delete in the Template listing.
- Click the "Delete" icon to delete it. You will be asked to confirm the deletion before it actually occurs.
- Confirming the deletion will refresh the Template Manager listing, and the template will be moved to deleted template listing. Once moved the template is no longer available for use.
- If you want to list all deleted templates, click on "View Deleted" link on Filter Templates form. All deleted templates will show.
- If you want to restore a template, click the "Restore Template" icon. If you want to delete a template permanently, click the "Delete Permanently" icon.
Filtering the Template Listing:
- If the template listing becomes too long to easily find the template you are looking for, you can filter the listing using Filter Templates form.
- Template listing can be filtered by templates' attributes, status, category, and partial template name.
- Enter the text you wish to filter on in the "Template Name" field. For example, enter "admin".
- Click the "Filter" button. The template listing will refresh, displaying all templates matching your filter criteria. In our example, all templates with the word "admin" in their name will be displayed.
Using Upload Manager:
Another module that will be helpful with Template Manager is Upload Manager. This module is intended to provide a "walled garden" to safely allow you to upload and manage files on your site without using more difficult tools like FTP.
By default, Upload Manager is enabled with images directory assigned for file upload destination. This information is saved in the map LOCAL_UPLOADMANAGER_ALLOWED_DIRS. If you need to allow more directories for file uploads, update the value of this map. For example, this map has value "images/" when Upload Manager is installed. If you want to add pdfs directory, change the map's value to "images/; pdfs/"
A Quick Demonstration:
- Use Upload Manager to upload any image such as a JPEG Photograph from your digital camera to the default /images directory.
- Use template manager to create a new template called test.template.
- Use the two most important LunpaCMS tags to add a heading and an image to the test.template. These tags allow you to quickly create a new template that includes images and heading with a consistent look and feel.
- Add this to the heading:
:::HEADING:This is a Test Heading:::
:::IMAGE:<image you uploaded>:ARGS: maxwidth=200&maxheight=400&alt=Test Image&border_1_size=2&border_1_color=:::color_background:::&border_2_size=2&border_2_color=black&align=left :::
- View your new template by clicking view in Template Manager and explorer. There are many options for Heading and Image tags that can enhance your site with automated resizing and text elements.
- Browsers will ignore spaces and returns in your templates. So you will need to learn a few HTML tags to get started:
<br> = a single line break
<p> = a paragraph break
<b>bold</b> = bold
<i>italics</i> = italics
- Navigate to Files/Uploads > File Uploads from main menu.
- Choose a "Directory" which you want to upload your files into.
- Click on "Drag and Drop" box to find files to upload from your computer. Or just drag and drop files to upload into this box.
- Click the "Upload" button to upload your files.
Using the Link to a Uploaded File:
- Click on the file name that you need link for from the file list, and Upload Manager will open a pop-up window with file information on it.
- Click on "Share URL" field, and it will be highlighted.
- Hit 'Ctrl'+'c' to copy highlighted "Share URL" to the clipboard of your computer.
- Hit 'Ctrl'+'v' to paste copied content to desired location.
- Also, "Share URL" is available on status message after you successfully upload a file.
Copyright © 2019 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