contenido\includes\functions.tpl.php
Project:
Contenido Content Management System
Description:
Define the Template related functions
Requirements:
- Author
- Olaf Niemann
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend includes
- Since
- file available since contenido release <= 4.6
{@internal
created 2003-01-21
modified 2008-06-26, Frederic Schneider, add security fix
modified 2008-06-30 timo.trautmann added fix module settings were also copied in function tplDuplicateTemplate
modified 2009-01-08, Timo Trautmann fixed bug: Changes in Head Containers in visualedit were not stored
$Id: functions.tpl.php 1199 2010-08-24 14:31:44Z timo.trautmann $:
}}
- Version
- 1.0.1
Functions


tplBrowseLayoutForContainers( $idlay) : stringBrowse a specific layout for containers
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
Returns| Type | Description |
|---|
| string | &-seperated String of all containers |
Details- Author
- Jan Lengowski
- Copyright
- four for business AG


tplDeleteTemplate(int $idtpl) : \$new_idtplParameters| Name | Type | Description |
|---|
| $idtpl | int | ID of the template to duplicate |
|---|
Returns| Type | Description |
|---|
| \$new_idtpl | ID of the duplicated template |
Details- Author
- Olaf Niemann
- Author
- Jan Lengowski
- Copyright
- four for business AG


tplDuplicateTemplate(int $idtpl) : \$new_idtplParameters| Name | Type | Description |
|---|
| $idtpl | int | ID of the template to duplicate |
|---|
Returns| Type | Description |
|---|
| \$new_idtpl | ID of the duplicated template |
Details- Author
- Jan Lengowski
- Copyright
- four for business AG


tplEditTemplate( $changelayout, $idtpl, $name, $description, $idlay, $c, $default) : voidEdit or create a new Template
Parameters| Name | Type | Description |
|---|
| $changelayout | | |
|---|
| $idtpl | | |
|---|
| $name | | |
|---|
| $description | | |
|---|
| $idlay | | |
|---|
| $c | | |
|---|
| $default | | |
|---|
Details- Author
- Olaf Niemann
- Author
- Jan Lengowski
- Copyright
- four for business AG


tplGetContainerDefault( $idlay, int $container) : arrayRetrieve the default module
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
| $container | int | Container number |
|---|
Returns| Type | Description |
|---|
| array | Allowed container types |


tplGetContainerMode( $idlay, int $container) : stringRetrieve the container mode
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
| $container | int | Container number |
|---|
Returns| Type | Description |
|---|
| string | Container name |


tplGetContainerName( $idlay, int $container) : stringRetrieve the container name
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
| $container | int | Container number |
|---|
Returns| Type | Description |
|---|
| string | Container name |


tplGetContainerTypes( $idlay, int $container) : arrayRetrieve the allowed container types
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
| $container | int | Container number |
|---|
Returns| Type | Description |
|---|
| array | Allowed container types |


tplGetInUsedData(int $idtpl) : arrayGet used datas if a template is in use
Parameters| Name | Type | Description |
|---|
| $idtpl | int | Template ID |
|---|
Returns| Type | Description |
|---|
| array | - category name, article name |
Details- Author
- Munkh-Ulzii Balidar
- Copyright
- four for business AG


tplIsTemplateInUse(int $idtpl) : boolChecks if a template is in use
Parameters| Name | Type | Description |
|---|
| $idtpl | int | Template ID |
|---|
Returns| Type | Description |
|---|
| bool | is template in use |
Details- Author
- Jan Lengowski
- Copyright
- four for business AG
modified Munkh-Ulzii Balidar, improved the sql query without while loop


tplPreparseLayout( $idlay) : \nonePreparse the layout for caching purposes
Parameters| Name | Type | Description |
|---|
| $idlay | | |
|---|
Returns 

tplcfgDuplicate(int $idtplcfg) : intCopies a complete template configuration
Parameters| Name | Type | Description |
|---|
| $idtplcfg | int | Template Configuration ID |
|---|
Returns| Type | Description |
|---|
| int | new template configuration ID |