Table des matières
- The pagelayout -- Le template pagelayout.tpl
- The page head -- L'en-tête de page (page_head.tpl)
- Variables in pagelayout -- Variables du template pagelayout.tpl
Variables in pagelayout -- Variables du template pagelayout.tpl
Date de publication: le lundi 28 mars 2011 à 22h18
Dernière modification: par Pascal BOYER le jeudi 31 mars 2011 à 14h50
versions 3.9, 3.10, 4.x
The pagelayout template contains miscellaneous variables that can be used to display information about the state of the system and/or to control the output. The following table shows the available variables along with a brief description.
Le template pagelayout.tpl contient de nombreuses variables utilisées pour afficher des informations sur l’état du système et/ou pour contrôler le code généré. Le tableau suivant présente ces variables accompagnées d’un bref descriptif:
| Variable | Type | Description |
|---|---|---|
| $access_type |
array tableau |
The name of the siteaccess (as "name") and the ID number (as "type") of the access method that was used (1=URL, 2=Host, 3=Port). Le nom du siteaccess et le numéro de ID de la méthode d’accès utilisée (1=URL, 2=Host, 3=Port). |
| $anonymous_user_id |
integer entier |
The ID number of the content object that represents the anonymous user account (the default/standard value is 10). Le numéro de ID de l’objet de contenu représentant le compte de l’utilisateur anonymous (la valeur par défaut est 10). |
| $current_user |
object objet |
The ezuser object of the user who is currently logged in. If no user is logged in, the anonymous user account will be used. L’objet ezuser de l’utilisateur actuellement connecté. Si aucun utilisateur n’est connecté, le compte de l’utilisateur anonymous est utilisé. |
| $ezinfo |
array tableau |
An array of three strings: "version", "version_alias" and "revision". These strings reveal basic information about the eZ Publish release that is being used. Un tableau de trois chaînes de caractères: version, version_alias et revision. Ces trois chaînes de caractères donnent des informations basiques sur la version utilisée de eZ Publish. |
| $module_result |
array tableau |
Contains information about the result (and the result itself) generated by the module/view that was executed. Contient des informations sur le résultat généré par l’exécution du couple module/vue (et sur le résultat lui-même). |
| $navigation_part |
array tableau |
A hash containing the name and the identifier (the keys are "name" and "identifier") of the current navigation part; for example: "Content structure" and "ezcontentnavigationpart". The navigation part is used by the administration interface to determine which part the user interacts with. Un hash contenant le nom et l’identifiant (les clefs sont name et identifier) de la partie du site actuellement visitée. Par exemple: Content structure et ezcontentnavigationpart. La partie du site visitée (naviguée) est utilisée par l’interface d’administration pour déterminer la partie du site avec laquelle l’utilisateur interagit. |
| $requested_uri_string |
string chaîne de caractères |
Contains the site specific part of the requested URL, for example: "content/view/full/44" (system URL) or "company/about" (virtual URL). Contient la partie spécifique du site contenue dans l'URI demandé. Par exemple: content/view/full/44 (URI système) ou company/about (URI virtuel). |
| $site |
array tableau |
Contains miscellaneous information about the siteaccess that is being used (site name, design resource, meta tags, etc.) Contient différentes informations sur le siteaccess utilisé (nom du site, ressources du design, meta balises, etc...) |
| $ui_component |
string chaîne de caractères |
The user interface component which eZ Publish uses while the current page is being shown. This variable is used by the administration interface. Le composant de l’interface utilisateur que eZ Publish utilise lorsque la page courante est affichée. Cette variable est utilisée par l’interface graphique d’administration. |
| $ui_context |
string chaîne de caractères |
The user interface context in which eZ Publish is in while the current page is being shown. This variable is used by the administration interface to distinguish between different modes (for example "navigation", "edit", "browse", etc.). Le contexte de l’interface utilisateur dans lequel se trouve eZ Publish lorsque la page courante est affichée. Cette variable est utilisée par l’interface graphique d’administration pour faire la distinction entre les différents modes (navigation, edit (edition), browse (parcourir), etc...). |
| $uri_string |
string chaîne de caractères |
The system version of the requested URL (for example "/content/view/full/13"). La version système de l'URI demandé (par exemple /content/view/full/13). |
| $warning_list |
array tableau |
An array of warnings related to problems that were discovered when the page was rendered. Un tableau de messages d’alerte relatifs à des problèmes survenant lors de l’affichage d’une page. |
$module_result / Le tableau $module_result
The $module_result array contains the result that was generated by the module/view which was executed. If eZ Publish was instructed to display the contents of a node, the variable will contain additional information about the node that was requested. If eZ Publish was instructed to do something else (practically anything that is not an actual node view), the result will not contain additional information. The following tables show the contents of the $module_result variable in the different scenarios.
Le tableau $module_result contient le résultat génère par l’exécution du couple module/vue. Si eZ Publish doit afficher le contenu d’un nœud, alors cette variable contient des informations supplémentaires sur le nœud demandé. Si eZ Publish doit faire quoi que ce soit d’autre que d’afficher le contenu d’un nœud, alors le résultat ne contient pas d’information supplémentaire. Le tableau suivant présente le contenu de la variable $module_result dans différentes situations:
The default $module_result / Contenus par défaut de $module_result
| Élément | Type | Description |
|---|---|---|
| content |
string chaîne de caractères |
The actual content (result of templates) that was generated by the requested view. Le contenu (le résultat des templates) généré par la vue demandée. |
| path |
array tableau |
An array of hashes containing information about the path which leads to the page that is currently being viewed. Each hash contains the following keys: "text", "url". The "text" element usually contains the name of the module/view (for example "Collected information"). The "url" element contains the address. The "url" key of the last element in the array is usually set to false.
The standard page_head template uses the path array to build the TITLE component of the HEAD section. In addition, the path array can for example be used to build breadcrumbs (a path with names (as hyperlinks) of pages/views that lead to the current page/view). |
| is_default_navigation_part |
boolean booléen |
Returns TRUE if the default navigation part is being used (the one which is set in PHP code). Returns FALSE if the navigation part of the current module/view has been reconfigured by the site administrator. This can be done by making use of the "NavigationPart" directive of the "[ModuleSettings]" section within a configuration override for "module.ini". Retourne TRUE (vrai) si la partie visitée par défaut est utilisée (celle paramétrée dans le code PHP). Retourne FALSE si la partie visitée du couple module/vue affiché a été reconfigurée par l’administrateur du site par le biais du paramètre NavigationPart de la section [ModuleSettings] de l'un des templates de surcharge du fichier de configuration module.ini |
| navigation_part |
string chaîne de caractères |
The identifier of the current navigation part (for example "ezcontentnavigationpart"). This variable is used by the administration interface to determine which part the user interacts with. L’identifiant de la partie visitée courante (par exemple ezcontentnavigationpart). Cette variable est utilisée par l’interface d’administration pour déterminer la partie de l’interface avec laquelle l’utilisateur interagit. |
| ui_context |
string chaîne de caractères |
The user interface context in which eZ Publish is in while the current page is being shown. This variable is used by the administration interface to distinguish between different modes (navigation, edit, browse, etc.) Le contexte de l’interface utilisateur dans lequel eZ Publish se trouve lorsque la page courante est affichée. Cette variable est utilisée par l’interface d’administration pour faire la distinction entre les différents modes (navigation, edit (édition), browse (parcourir), etc...). |
| ui_component |
string chaîne de caractères |
The user interface component which eZ Publish uses while the current page is being shown. This variable is used by the administration interface. Le composant de l’interface utilisateur que eZ Publish utilise lorsque la page courante est affichée. Cette variable est utilisée par l’interface d’administration. |
| uri |
string chaîne de caractères |
Contains the site specific part of the requested URL, for example: "content/view/full/44" (system URL) or "company/about" (virtual URL). Contient la partie spécifique du site contenue dans l'URI demandé. Par exemple: content/view/full/44 (URI système) ou company/about (URI virtuel). |
The $module_result when a node is being viewed / Contenus de $module_result lorsqu'un nœud est affiché
| Elément | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| content |
string chaîne de caractères |
The actual content (result of templates) that was generated by the requested view. Le contenu (résultat des templates) généré par la vue demandée. |
||||||||||||||||||||||||||||||||||||
| view_parameters |
array tableau |
An array of the parameters that were sent to the view (for example "limit", "offset", etc.). Un tableau de paramètres envoyés à la vue (par exemple limit, offset, etc...). |
||||||||||||||||||||||||||||||||||||
| path |
array tableau |
An array of hashes containing information about the path of nodes which lead to the node that is currently being viewed. Each hash contains the following components:
The node being viewed will have its "url" and "url_alias" components set to false. In addition, the "node_id" will not be available. The path array can for example be used to build breadcrumbs (a path with names (as hyperlinks) of the objects referenced by the nodes that lead to the target/current node). |
||||||||||||||||||||||||||||||||||||
| title_path |
array tableau |
The TTL (Time To Live) value of the result that was generated by the module's view (as seconds). A TTL of minus one means that the view cache should never expire. A TTL of zero means that the result should never be cached. La valeur TTL (Temps à vivre en seconde) du résultat généré par la vue du module. Un TTL de -1 signifie que la vue en cache ne doit jamais expirer. Un TTL égale à 0 signifie que le résultat ne doit jamais être mis en cache. |
||||||||||||||||||||||||||||||||||||
| section_id |
string chaîne de caractères |
The ID number of the section which the object referenced by the node being viewed belongs to. Le numéro de ID de la section à laquelle appartient l’objet référencé par le nœud affiché. |
||||||||||||||||||||||||||||||||||||
| node_id |
string chaîne de caractères |
The ID number of the node that is being viewed. Le numéro de ID du nœud affiché. |
||||||||||||||||||||||||||||||||||||
| content_info |
array tableau |
Contains miscellaneous information about the node that is being viewed:
|
||||||||||||||||||||||||||||||||||||
| navigation_part |
string chaîne de caractères |
Contains the name identifier of the current navigation part (for example "ezcontentnavigationpart"). This variable is used by the administration interface to determine which part the user interacts with. Contient le nom de l’identifiant de la partie visitée courante (par exemple ezcontentnavigationpart). Cette variable est utilisée par l’interface d’administration pour déterminer la partie navigation avec laquelle l’utilisateur interagit. |
||||||||||||||||||||||||||||||||||||
| cache_ttl |
integer entier |
The TTL (Time To Live) value of the result that was generated by the module's view (as seconds). A TTL of minus one means that the view cache should never expire. A TTL of zero means that the result should never be cached. La valeur TTL (Temps à vivre en seconde) du résultat généré par la vue du module. Un TTL de -1 signifie que la vue en cache ne doit jamais expirer. Un TTL égale à 0 signifie que le résultat ne doit jamais être mis en cache. |
||||||||||||||||||||||||||||||||||||
| is_default_navigation_part |
boolean booléen |
Returns TRUE if the default navigation part is being used (the one which is set in PHP code). Returns FALSE if the navigation part of the current module/view has been reconfigured by the site administrator. This can be done by making use of the "NavigationPart" directive of the "[ModuleSettings]" section within a configuration override for "module.ini". Retourne TRUE si la partie visitée par défaut est utilisée (celle paramétrée dans le code PHP). Retourne FALSE si la partie visitée du couple module/vue affiché a été reconfigurée par l’administrateur du site par le biais du paramètre NavigationPart de la section [ModuleSettings] de l'un des templates de surcharge du fichier de configuration module.ini |
||||||||||||||||||||||||||||||||||||
| ui_context |
string chaîne de caractères |
The user interface context in which eZ Publish is in while the current page is being shown. This variable is used by the administration interface to distinguish between different modes (navigation, edit, browse, etc.) Le contexte de l’interface utilisateur dans lequel eZ Publish se trouve lorsque la page courante est affichée. Cette variable est utilisée par l’interface d’administration pour faire la distinction entre les différents modes (navigation, edit (édition), browse (parcourir), etc...). |
||||||||||||||||||||||||||||||||||||
| ui_component |
string chaîne de caractères |
The user interface component used by eZ Publish while the current page is being shown. This variable is used by the administration interface. Le composant de l’interface graphique utilisateur que eZ Publish utilise lorsque la page courante est affichée. Cette variable est utilisée par l’interface d’administration. |
||||||||||||||||||||||||||||||||||||
| uri |
string chaîne de caractères |
The site specific part of the requested URL, for example: "content/view/full/44" (system URL) or "company/about" (virtual URL). Contient la partie spécifique du site contenue dans l'URI demandé. Par exemple: content/view/full/44 (URI système) ou company/about (URI virtuel). |
Table des matières
- The pagelayout -- Le template pagelayout.tpl
- The page head -- L'en-tête de page (page_head.tpl)
- Variables in pagelayout -- Variables du template pagelayout.tpl
Commentaires














