(Opens in a new window - öffnet in einem neuen Fenster)
Short Documentation Plugin "SubsiteFuncs"
Version SubsiteFuncs 2.5 - released 2023-07
Short Description
The CMSimple Plugin SubsiteFuncs includes 5 features:
- You can create Subsites menus (similar to the language menu), the menus can present all registered subsites or single groups of subsites
- Group menus shows the subsites, arranged in groups
- Extended search within subsites, that are contained in the text database
- XML Sitemap for all subsites, that are contained in the text database
- Replacement of the CMSimple sitemap by a sitemap of all subsites
Existing sub-sites are recognized automatically, but they have to be written into a text database, for that they appear in the menus, are detected by the search and contained in the XML Sitemap.
This way you can continue to operate independent subsites, not appearing in the menus, and not detected by search and XML Sitemap.
1. System Requirements
A working installation of CMSimple 4.2 or higher.
Recommended is the current version of CMSimple.
2. Installation
- Download the zip-file and unzip it with a suitable program.
-
- Upload the folder structure of the folder "CMSimpleRoot" (the folders "plugins" and "content") into the install folder (root folder) of your CMSimple installation.
- Ignore requests of your ftp program, click "ja" or "ok", there will no files be overwritten by the first installation.
- If you update, simply don't upload the "content" folder.
- Define the necessary writing permissions for folders and files by your ftp program.
Before an update you should create a backup copy of the old plugins, so you can restore changes / additions in the stylesheet.css, the configuration and language files.
3. Files- and Folders Permissions
Folders: chmod 777
- ./plugins/subsitefuncs/languages/
Files: chmod 666
- ./plugins/subsitefuncs/languages/alle Dateien
- ./plugins/subsitefuncs/config/config.php
- ./plugins/subsitefuncs/css/stylesheet.css
- ./content/plugins/subsitefuncs/ssf_data.php
4. The Functions (Plugin Calls)
4.1 The Subsites Menu
Because the menus usually are called in the template, here the syntax for calling in the template.htm is presented.
This function is the main function. When called with no parameters, this function displays all the subsites that are included in the text database:
<?php echo ssf_subsitesMenu();?>
By specifying the following parameters can affect the output of the function:
<?php echo ssf_subsitesMenu('Group','Link to the main site','CSS class Extension');?>
Group: the name of the shown group. default: 'all' (all Groups)
Link to the main site: 'true' shows a link to the main site (CMSimple Root). default: 'true'
CSS class Extension: for alternative CSS, will be appended to the class name of the div container. default: 'default'
4.2 The Groups Menus
The Groups menus are not such easy to understand and should be used by experienced users only. They are useful only in very extensive structured websites, usually the subsites menus are sufficient.
4.2.1 The Groups Menu JS1
The group menus can be individually opened and closed, the current group is always open. When called with no parameters, the menu is displayed in the default design.
<?php echo ssf_groupsMenuJS1();?>
By specifying the following parameters can affect the output of the function:
<?php echo ssf_groupsMenuJS1('design class extension','functional class extension','hight of closed menu items');?>
design class extension (optional): CSS class extension, will be appended to the class name of the div container. default: 'default'. Only necessary if differently styled menus are in use.
functional class extension (optional): class extension, will be appended to the class name. default: '' (empty). Only needed if several identical menus are placed on one page. Example: '01'
hight of closed menu items (optional): default: 36px. Example: '48px'
4.2.2 The Groups Menu JS2
Only one item is opened. When called with no parameters, the menu is displayed in the default design and without ID extension.
<?php echo ssf_groupsMenuJS2();?>
By specifying the following parameters can affect the output of the function:
<?php echo ssf_groupsMenuJS2('design class extension','ID Extension','hight of closed menu item');?>
design class extension (optional): CSS class extension, will be appended to the class name of the div container. default: 'default'. Only necessary if differently styled menus are in use.
ID Extension (optional): ID extension, will be appended to the ID of the menu, default: '' (empty). Only needed if several identical menus are placed on one page. Example: '01'
hight of closed menu items (optional): default: 36px. Example: '48px'
4.2.3 The Open Groups Menu
In this menu, all group menus are opened. When called with no parameters, the menu is displayed in the standard design.
<?php echo ssf_groupsMenuOpen();?>
By specifying the following parameters can affect the output of the function:
<?php echo ssf_groupsMenuOpen('design class extension');?>
design class extension (optional): CSS class extension, will be appended to the class name of the div container. default: 'default'. Only necessary if differently styled menus are in use.
5. The Extended Search Function
In the plugin configuration you can activate the "search function on all subsites". The normal CMSimple search function will search in all subsites, and returns the results sorted by subsites.
If the "search function on all subsites" is not enabled, the search function will search only in the current (sub)site.
6. The XML Sitemap
The XML sitemap is automatically activated when the plugin SubsiteFuncs is installed. You can view the generated XML Sitemap, by appending "?xmlsitemap" to the the URL in the address bar of your browser.
This XML Sitemap You must announce to the search engines. This is done with a robots.txt, this file must be in the CMSimple_Root and must contain the following line:
Sitemap: http://www.example.com/?xmlsitemap
The easiest way is to call the XML sitemap in the real CMSimple installation, and copy the URL to the corresponding line of the robots.txt. If there is still no robots.txt, you need to create this, enter the line and upload the file to the CMSimple_Root.
7. CMSimple Sitemap Over All Subsites
In the plugin configuration, you can replace the normal CMSimple sitemap by a "sitemap of all registered subsites". Find out more in the help text (blue question mark) of the plugin configuration.
8. The Plugin Data - The Backend
Under "Edit Plugin Data" in the plugin backend you can enter subsites, these subsites will appear in the menus, be searched and are included in the XML Sitemap.
For each subsite there is a row of 3 elements, separated by a vertical bar:
folder|name of the subsite|Group
example|Example Subsite|all
...
If you work without group (the normal case), you nonetheless need to enter the 3rd element, just write something, for example "all"
In order to avoid spelling mistakes and as a reminder, you will find lists of all subsites, defined in the data file, and all groups, listed in the plugin configuration, below the textarea.
9. Credits
The modules Search, Sitemap and XML Sitemap are created by Martin
The SubsiteFuncs Plugin is sponsored by Hubertus