couteauprive:titre_parent:description fr en

Se connecter

Vous ne pouvez modifier cet item de langue.

Code de langue Module Texte de la langue d’origine Traduction en "en" Statut
titre_parent:description couteauprive [?] Au sein d’une boucle, il est courant de vouloir afficher le titre du parent de l’objet en cours. Traditionnellement, il suffirait d’utiliser une seconde boucle, mais cette nouvelle balise #TITRE_PARENT allégera l’écriture de vos squelettes. Le résultat renvoyé est : le titre du groupe d’un mot-clé ou celui de la rubrique parente (si elle existe) de tout autre objet (article, rubrique, brève, etc.).

Notez : Pour les mots-clés, un alias de #TITRE_PARENT est #TITRE_GROUPE. Le traitement SPIP de ces nouvelles balises est similaire à celui de #TITRE.

@puce@ Si vous êtes sous SPIP 2.0, alors vous avez ici à votre disposition tout un ensemble de balises #TITRE_XXX qui pourront vous donner le titre de l’objet ’xxx’, à condition que le champ ’id_xxx’ soit présent dans la table en cours (#ID_XXX utilisable dans la boucle en cours).

Par exemple, dans une boucle sur (ARTICLES), #TITRE_SECTEUR donnera le titre du secteur dans lequel est placé l’article en cours, puisque l’identifiant #ID_SECTEUR (ou le champ ’id_secteur’) est disponible dans ce cas.

La syntaxe <html>#TITRE_XXX{yy}</html> est également supportée. Exemple : <html>#TITRE_ARTICLE{10}</html> renverra le titre de l’article #10.[[%titres_etendus%]]
Within a loop, it is common to want to show the title of the parent of the current object. You normally need to use a second loop to do this, but a new tag #TITRE_PARENT makes the syntax easier. In the case of a MOTS loop, the tag gives the title of the keyword group. For other objects (articles, sections, news items, etc.) it gives the title of the parent section (if one such exists).

Note: For keywords, #TITRE_GROUPE is an alias tag for #TITRE_PARENT. SPIP treats the contents of these new tags as it does other #TITRE tags.

@puce@ If you are using SPIP 2.0, then you can use an array of tags of this form: #TITRE_XXX, which give you the title of the object ’xxx’, provided that the field ’id_xxx’ is present in the current table (i.e. #ID_XXX is available in the current loop).

For example, in an (ARTICLES) loop, #TITRE_SECTEUR will give the title of the sector of the current article, since the identifier #ID_SECTEUR (or the field ’id_secteur’) is available in the loop.

The code <html>#TITRE_XXX{yy}</html> is also available to be used. Example: <html>#TITRE_ARTICLE{10}</html> will return the title of article #10.[[%titres_etendus%]]
OK

Les dernières modifications

De cette chaine

1 révision
# objet Titre : Auteur Date
Trad-lang titre_parent:description : couteauprive - en PatV Avril 2012

De la chaîne originale

Cette chaîne n’a jamais été modifiée.