This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation. |
CMS
To enable the CMS you need to install / enable the mod_rewrite module for Apache.
More info about mod_rewrite can be found here: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
You must know the Site ID of the website. This can be found in Group-Office at:
Websites -> Sites -> Double click the site
Then you must add the following rewrite rule to your VirtualHost section:
RewriteEngine On
RewriteBase /modules/cms/
RewriteRule ^(.*)$ run.php?site_id=<The Site ID here>&path=$1&basehref=/
The rewrite base might be different in your environment. Here Group-Office is located in the DocumentRoot.
Variables available in the templates
$file is an array with the following members:
.id = id of the file
.folder_id = id of the file's folder
.extension = file extension
.size = filesize
.ctime = Unix timestamp of the creation time of the file
.mtime = Unix timestamp of the modification time of the file
.name = Name of the file
.content = Contents of the file
.title = Meta title of the file
.description = Meta description of the file
.keywords = Meta keywords of the file
- $folder
.id = of the folder
.parent_id = parent folder id
.ctime = Unix timestamp of the creation time of the folder
.mtime = Unix timestamp of the modification time of the folder
.name = Name of the folder
.disabled = Disabled folder (0 or 1)
- $item
.type = type of the item (folder or file)
.name = name of the item
.title = title of the item
.id = id of the item
.href = URL to the item
.option_values = values from the config.xml that come from the <input>'s
- $cms_url = Path to the CMS module folder in Group-Office
Functions
To get a list of items from a folder you can use the following command:
{items} Dit heeft de volgende parameters:
$root_path = het pad naar de hoofdmap $root_folder_id = id van de map waaruit de bestanden gehaald moeten worden $expand_levels = hoe diep moet in de mappen gekeken worden (0 is alleen in de $root_folder) $class = het commando {items} kan ook zelf classes samenstellen, geef hier de naam van de class. $level = op welk niveau gekeken moet worden (de map '/root/map' is bijvoorbeeld niveau 1) $item_template = welke template gebruikt moet worden voor het lijstje items (welke .tpl file) $active_item_template = welke template gebruikt moet worden voor het actieve (momenteel geselecteerde) item. $max_items = het maximaal aantal items dat moet worden weergegeven.
Vervolgens in de cms alle pagina's aanmaken, deze koppelen aan de juiste (zojuist gemaakte) templates en teksten op de pagina zetten. Door op de knop View te klikken kunt u de zojuist opgezette pagina bekijken.