Folder as Startpage

In this chapter described:

This feature makes it possible to enter an URL of your portal without the filename and the portal opens automatically the startpage of this folder (depending on the portal language)

1 How this feature works

In your CMS your editors can set startpages per language for folders. These folders represent entries in the navigation. Sometimes it’s useful to use only http://www.<domain>.com/Content.Node/company/ as an URL without any index.en.html at the end. With this feature the portal automatically looks up the right startpage for this folder depending on the language and displays it.

2 Configuration

You have to define in your tagmap-editor in the CMS the parameter startpageurl_<language code> (i.e. startpageurl_de). Then you have to define in your custom configuration:

  1. startPageFallback for default filename of the startpage
  2. startPageDynamic must be set to true

        'contentSource' => array(
            //Current content renderer class
            //Allowed values:
            // - DynamicContentSource
            // - FileSystemContentSource
            'sourceClass' => 'DynamicContentSource',
            'startPageFallback' => 'index.html',
            'startPageDynamic' => true,
            //Content repository settings
            ...........................

Check in /frontend/config/main.php if the right rules are defined:

  1. ‘<path:Content\.Node\/.\.(.)>’ => ‘contentSource/renderer/static’,
  2. ’<path:Content\.Node><folder:\/.&gt;' => 'contentSource/renderer/startPage',

<html> //Components manages the URLs of Web applications. 'urlManager' => array( //The URL format. Defaults to 'path'. Valid values include 'path' and 'get'. 'urlFormat' => 'path', //whether to show entry script name in the constructed URL. Defaults to true 'showScriptName' => false, //array the URL rules (pattern=>route). 'rules' => array( 'user/assignment/<action:\w>’ => ‘user/rightsAssignment/’, ‘<path:Content\.Node\/.\.(php|html)>' => 'contentSource/renderer/dynamic', '<path:Content\.Node\/.\.(.)>' => 'contentSource/renderer/static', '<path:Content\.Node><folder:\/.>’ => ‘contentSource/renderer/startPage’, // ‘<path:GenticsImageStore\/.>' => 'contentSource/renderer/static', '<controller:\w>/<id:\d>' => '<controller>/view', '<controller:\w>/<action:\w>/<id:\d>’ => ‘/’, ‘<controller:\w>/<action:\w>’ => ‘/’, ‘<module:\w>/<controller:\w>/<action:\w>' => '<module>/<controller>/<action>', '<controller:\w>’ => ‘/index’,

), ),