Contenido

Frontend customizing

Author Björn Behrens (HerrB)
Created 20th September 2006
Audience Site Administrators
Applies to Contenido 4.6.15 or later

Introduction

Frontend customizing is a mechanism to customize various parameters of the frontend. There are not many settings you can do, as this mechanism is relatively new. However, this mechanism will be used more and more in the future.

How it works

Customizing Contenido settings is very easy and can be done via the system or client customizing settings.

Important: User settings have precendence before group settings. User settings always override group settings. If the user is added to more than one group, the result is undefined. Make sure that your groups don't override each other.

Common parameters

Area/Type Property Value (Description) Applies to
login_error_page idcatart If specified, then a user who is logged out or tries to open a protected category if not logged in will get redirected to the page specified by idcatart. This setting overrides other login_error_page settings. Clients, System
login_error_page idcat If specified, then a user who is logged out or tries to open a protected category if not logged in will get redirected to the category specified by idcat. You can specify idcat and/or idart (see next setting). Clients, System
login_error_page idart If specified, then a user who is logged out or tries to open a protected category if not logged in will get redirected to the article specified by idart. You can specify idcat and/or idart (see previous setting). System, Clients

ModRewrite parameters

Any setting will overwrite his default setting in config.php

Area/Type Property Value (Description) Applies to
ModRewrite use 0 or 1
Activate rewrite of all internal URL. IMPORTANT: it don't activate mod rewrite on your webserver! It rewrites only the internal Contenido URLs. For activation modrewrite on your webserver, please activate including .htaccess (remove first underscore _ from _.htaccess)
Clients, System
ModRewrite rootdir e.g. /subdir/
Path from sight of your browser to location of .htaccess file. If .htaccess is located in document root, so set it to '/' (without quotes), If .htaccess is located in a subdirectory of your webspace, set it to '/subdirectory/' (without quotes)
Clients
ModRewrite startfromroot 0 or 1
If activated (1) it will start writeing the url with tree name of categories, if deaktivated (0, default) it will start writeing the url with first category level
Clients
ModRewrite use_language 0 or 1
usage of language in url (default 0 for single language clients)
Clients
ModRewrite use_language_name 0 or 1
only necessary if use_language parameter is activated. if activated (1) it will write the language name in url, else it will write language id in url
Clients
ModRewrite use_client 0 or 1
usage of client in url (default 0)
Clients
ModRewrite use_client_name 0 or 1
only necessary if use_client parameter is activated. if activated (1) it will write the client name in url, else it will write client id in url
Clients
ModRewrite use_lowercase_uri 0 or 1
(default 1)
If activated (1) it will transform all category and article names to lowercase
Clients
ModRewrite file_extension .html
(.html)
set custom file extension for article names. Important: Changes causes changings in .htaccess!
Clients
ModRewrite category_resolve_min_percentage 0 - 100
(default 75)
Set sensibility for similar urls before error page will shown.
If current URL no category matches, this percentage value will control the return of the similarest categorie (soundex used). If 0, there will be never shown a error page. If 100 a error page will shown, if only one typo is in your url.
Clients
ModRewrite use_categories_as_html_file 0 or 1
(default 0)
if activated (1) it will write categories and articles as one html-file without directory structure. (e.g: www.domain.de/category1-category2.articlename.html)
Important: Changes causes reset of all aliases! Following simple Module should be run once:
<?php
    cInclude('classes','class.modrewrite.php');
    ModRewrite::reset_aliases();
?>
Clients
ModRewrite category_seperator (single char)
(default '-' (without quotes))
seperator of all categories if use_categories_as_html_file is activated
Important: Changes causes reset of all aliases! Following simple Module should be run once:
<?php
    cInclude('classes','class.modrewrite.php');
    ModRewrite::reset_aliases();
?>
Clients
ModRewrite article_seperator (single char)
(default '.' (without quotes))
seperator between categories and article if use_categories_as_html_file is activated
Important: Changes causes reset of all aliases! Following simple Module should be run once:
<?php
    cInclude('classes','class.modrewrite.php');
    ModRewrite::reset_aliases();
?>
Clients
ModRewrite category_word_seperator (single char)
(default '_' (without quotes))
seperator between words in one category, if use_categories_as_html_file is activated
Important: Changes causes reset of all aliases! Following simple Module should be run once:
<?php
    cInclude('classes','class.modrewrite.php');
    ModRewrite::reset_aliases();
?>
Clients
ModRewrite article_word_seperator (single char)
(default '-' (without quotes))
seperator between words in one article, if use_categories_as_html_file is activated
Important: Changes causes reset of all aliases! Following simple Module should be run once:
<?php
    cInclude('classes','class.modrewrite.php');
    ModRewrite::reset_aliases();
?>
Clients

Multiple Domain per Client Settings

Following settings causes the the rewrite of the (automaticly written) <base href="">-Tag in the head of your Website.

Area/Type Property Value (Description) Applies to
client frontend_path1 http://www.domain2.de/cms/
Set unlimited Domains for one client. Only use a incrementation of the value behind "frontend_path" property. Please specify the complete Domain-Path to the front_content.php like the example above. It causes a real using of your Domain and no switching between entrance Domain and Client-Domain.
Clients