Directory settings - Templates

You can use the'Templates' tab to define which templates should be used when creating a new file or directory.

Directory settings - Templates
Directory settings - Templates
Directory settings - Templates (inherited)
Directory settings - Templates (inherited)

Operation

General template definition:

This area provides you with information on the use of file and directory templates.
If corresponding templates exist, the number of existing templates is displayed. You can use the buttons to manage these directly.
If no templates exist, you can use the corresponding buttons to create your own templates so that you no longer inherit from overlying directories.

'Manage own file templates':

Clicking on this button opens the directory with the existing file templates. You can edit or delete existing templates or create new templates.
To create new templates, either copy an existing file template or create a new file. Give this new file template the desired name and adapt the content according to your requirements.

'Manage your own directory templates':

Clicking on this button opens the directory with the existing directory templates. You can adapt or delete existing templates or create new templates.
To create new templates, either copy an existing directory template or create a new directory. Give this new directory template the desired name and adjust the directory settings according to your requirements.

'Create your own file templates':

Click on this button to open the directory of file templates to create your own templates.
To create new templates, either copy an existing file template or create a new file. Give this new file template the desired name and adapt the content according to your requirements.

'Create your own directory templates':

Clicking on this button opens the directory of directory templates to create your own templates.
To create new templates, either copy an existing directory template or create a new directory. Give this new directory template the desired name and adjust the directory settings according to your requirements.

Extended template definition:

'Use the file templates of the directory':

In this field, you can use the right selection arrow Icon to select the directory whose templates are to be offered for creating new files.
If the field is empty, the templates specified in the 'Always use the following file templates' field are used. If this field is also empty, the following procedure is followed when creating a file in the current directory:
Starting from the current directory, the system searches for templates up to the top level. These must always be located in the following subdirectory in the respective directory:
/weblication/templates/documents/
(e.g. /en/current/weblication/templates/documents/).
All files available in this directory are offered when a file is created, depending on the authorization.
Please note:
If a file path is specified in the following field 'Always use the following file templates', this specification has higher priority!

'Always use the following file templates':

In this field, you can specify the file(s) to be used for this directory. You can specify multiple file paths separated by a pipe, e.g.:
/en/current/weblication/templates/documents/1-template-message.php|/en/events/weblication/templates/documents/event.php
If the field is empty, the templates specified in the 'Use the directory's file templates' field will be used. If this field is also empty, the following procedure is used when creating a file in the current directory:
Starting from the current directory, the system searches for templates up to the top level. These must always be located in the following subdirectory in the respective directory:
/weblication/templates/documents/
(e.g. /en/current/weblication/templates/documents/).
All files available in this directory are offered when a file is created, depending on the authorization.
Please note:
This field has a higher priority than the 'Use the directory's file templates' field!

'Suggested name for a new file':

In this field, you can enter a suggested name for a new file to be created. This is already entered in the template selection when a file is created in this directory and can be added.
The placeholders listed below can also be used here:

  • $rand
    Nine-digit random number (e.g. 723662842)
  • $year
    Current year (e.g. 2010)
  • $month
    Current month (e.g. 07)
  • $day
    Current day (e.g. 13)
  • $hour
    Current hour (e.g. 14)
  • $minute
    Current minute (e.g. 59)
  • $second
    Current second (e.g. 57)
  • $timestamp
    Current time as Unix timestamp (e.g. 1280842705)
  • $user
    Current user (e.g. mustermann)

'Name of the new file':

In this field, you can enter a name with which the new file is to be created (e.g.: index). In this way, you can ensure, for example, that only one file with a specific name can be created in a directory using the "Create file" function (e.g. index.php).
The placeholders mentioned above can also be used here, which allows you to assign file names that are randomized ($rand) or timestamped ($timestamp), for example.

'Create file immediately if both name and template
are preselected':

If this parameter is activated, the file is created directly when it is created if both the name and the template are preselected.

'Start editing directly if both name and template are preselected':

If this parameter is activated, the editing of the new file is opened directly when a new file is created if both the name and the template are preselected.

'Use the directory templates of the directory':

In this field, you can use the right selection arrow Icon to select the directory whose templates are to be offered for creating new directories.
If the field is empty, the templates specified in the 'Always use the following directory templates' field are used. If this field is also empty, the following procedure is followed when creating a directory in the current directory:
Starting from the current directory, the system searches for templates up to the top level. These must always be located in the following subdirectory in the respective directory:
/weblication/templates/directories/
(e.g. /en/current/weblication/templates/directories/).
All existing directories in this directory are offered when a file is created, depending on the authorization.
Please note:
If a path is specified in the following field 'Always use the following directory templates', this specification has higher priority!

'Always use the following directory templates':

In this field, you can specify the directory(s) to be used as templates for this directory. You can specify several directory paths separated by a pipe, e.g.:
/en/current/weblication/templates/directories/standard|/en/events/weblication/templates/directories/rss
If the field is empty, the templates specified in the 'Use the directory templates of the directory' field are used. If this field is also empty, the following procedure is used when creating a directory in the current directory:
Starting from the current directory, the system searches for templates up to the top level. These must always be located in the following subdirectory in the respective directory:
/weblication/templates/directories/
(e.g. /en/current/weblication/templates/directories/).
All existing directories in this directory are offered depending on the authorization when a directory is created.
Please note:
This field has a higher priority than the 'Use the directory templates of the directory' field!

'Suggested name for a new directory':

In this field, you can enter a suggested name for a new directory to be created. This is already entered in the template selection when a directory is created in this directory and can be added.
The placeholders listed below can also be used here:

  • $rand
    Nine-digit random number (e.g. 723662842)
  • $year
    Current year (e.g. 2010)
  • $month
    Current month (e.g. 07)
  • $day
    Current day (e.g. 13)
  • $hour
    Current hour (e.g. 14)
  • $minute
    Current minute (e.g. 59)
  • $second
    Current second (e.g. 57)
  • $timestamp
    Current time as Unix timestamp (e.g. 1280842705)
  • $user
    Current user (e.g. mustermann)

'Name of the new directory':

In this field, you can enter a name with which the new directory is to be created (e.g.: data). In this way, you can ensure, for example, that only a directory with a specific name can be created in a directory using the "Create directory" function (e.g. /data).
The above-mentioned placeholders can also be used here, which allows, for example, the assignment of directory names that are assigned randomly ($rand) or with a timestamp ($timestamp).

The settings stored in the templates for files and directories are applied when a new file or directory is created.
For example, you can already assign a role to the owner in the "Rights" tab, but leave the owner itself blank. The user who initiated the creation process is then entered as the owner.
A group with an assigned role can also be stored directly in the template so that the authorizations for members of this group already exist according to the assigned role after creation.

Function bar

'

'OK':':

Saves the changes made.

'

'Cancel':':

Interrupts the current edit and discards the changes made.