Les boucles spip et thelia
Pour télécharger Thelia Pour télécharger spip
Attention ces boucles nécessitent l'installation du plugin spip-thelia
Plugin Thélia le site du développement
Sommaire
Modification légère de la syntaxe de Thélia (plugin-thelia)
- Certaines balises Thélia sont identiques aux balises SPIP.
#TITRE, #CHAPO.
Pour éviter une confusion entre les deux moteurs
- il sera nécessaire de modifier légèrement la syntaxe des balises Thélia.
La modification à faire est la suivante :
- préfixer les balises du mot
THELIA-
- et supprimer le caractère
#
- la balise #TITRE se rapportant à un titre Thélia doit être renommée
THELIA-TITRE
#URL_PAGE{page}
#URL_PAGE retourne une url de type « page »
- vers la page passée en paramètre et qui pourra être utilisée dans un lien.
- Par exemple, pour accéder à la page générée par le squelette page.html,
- située dans votre répertoire plugins/plugin-thelia
- #URL_PAGE{page} généra automatiquement l’url spip.php?page=page.
- Un second paramètre est autorisé pour ajouter des paramètres à l’url.Exemple
- #URL_PAGE{page,lang=#LANG} génèrera l’url spip.php?page=page&lang=xxx.
Exemple #URL_PAGE{rubrique}
- Dans thelia
rubrique.php?
- et renomé dans spip et thelia
spip.php?page=rubrique_thelia
- par la boucle
#URL_PAGE{rubrique_thelia}
dans #URL_PAGE{rubrique_thelia, Un second paramètre est autorisé}
- Dans thelia
id_rubrique=#RUBRIQUE_ID
- et renomé dans spip et thelia
id_rubrique=THELIA-RUBRIQUE_ID
#URL_PAGE{rubrique_thelia,id_rubrique=THELIA-RUBRIQUE_ID}
Exemple #URL_PAGE{rubrique, page_thelia}
- Dans thelia
page
- et renomé dans spip et thelia
page_thelia
#URL_PAGE{rubrique_thelia,id_rubrique=THELIA-RUBRIQUE_ID&page_thelia=}
Exemple #URL_PAGE{rubrique, page_thelia=THELIA-PAGE_PREC}
- Dans thelia
#PAGE_PREC
- et renomé dans spip et thelia
THELIA-PAGE_PREC
<a href="#URL_PAGE{rubrique_thelia,id_rubrique=THELIA-RUBRIQUE_ID&page_thelia=THELIA-PAGE_PREC}"></a>
- boucle thelia
<a href="rubrique.php?id_rubrique=#RUBRIQUE_ID&page=#PAGE_PREC"></a>
- boucle renomée pour spip et thelia
<a href="#URL_PAGE{rubrique_thelia,id_rubrique=THELIA-RUBRIQUE_ID&page_thelia=THELIA-PAGE_PREC}"></a>
La variable #LANG
La variable #LANG ne renvoie la langue passée en URL qu'en dehors d'une boucle SPIP.
A l'intérieur d'une boucle spip, c'est la langue de l'article (ou de la rubrique, enfin, ce sur quoi on boucle) qui est retournée...
Par contre, SPIP à introduit depuis la version 1.8 une nouvelle variable #ENV qui permet de retourner une variable d'environnnement à l'intérieur d'une boucle spip.
Il faut modifié la boucle THELIA pour utiliser #ENV{lang} plutôt que #LANG et cela fonctionne parfaitement...
donc le form action devient:
<form action="#URL_PAGE{panier,lang=#ENV{lang}}" method="post" id="formAjouter">
Merci à shanrez pour cette astuce donnée sur le forum thelia
Liste des boucles spip et thelia (plugin-thelia)
- La boucle ACCESSOIRE spip et thelia
- La boucle ADRESSE spip et thelia
- La boucle CARACDISP spip et thelia
- La boucle CARACTERISTIQUE spip et thelia
- La boucle CARACVAL spip et thelia
- La boucle CHEMIN spip et thelia
- La boucle CLIENT spip et thelia
- La boucle COMMANDE spip et thelia
- La boucle CONTENU spip et thelia
- La boucle DECLIDISP spip et thelia
- La boucle DECLINAISON spip et thelia
- La boucle DECVAL spip et thelia
- La boucle DEVISE spip et thelia
- La boucle DOCUMENT spip et thelia
- La boucle DOSSIER spip et thelia
- La boucle IMAGE spip et thelia
- La boucle PAGE spip et thelia
- La boucle PAIEMENT spip et thelia
- La boucle PANIER spip et thelia
- La boucle PAYS spip et thelia
- La boucle PRODUIT spip et thelia
- La boucle QUANTITE spip et thelia
- La boucle RUBRIQUE spip et thelia
- La boucle RSS spip et thelia
- La boucle STOCK spip et thelia
- La boucle TRANSPORT spip et thelia
- La boucle VENTEPROD spip et thelia
- Les boucles conditionnelles spip et thelia
- Substitutions parrain spip et thelia
- Substitutions message spip et thelia
- Les filtres spip et thelia
- Les formulaires spip et thelia
Utilisation avancée du (plugin-thelia)
- PRODUITS_ARTICLES boucle produits Thélia associés aux articles SPIP
- RUBRIQUESTHELIA_ARTICLES boucle rubriques Thélia associées aux articles SPIP
- PRODUITS_RUBRIQUES boucle produits Thélia associés à des rubriques SPIP
- RUBRIQUESTHELIA_RUBRIQUES boucle rubriques Thélia associées à des rubriques SPIP
les liens à consulter pour le (plugin-thelia)
- Installation thelia et le plugin spip-thelia
- Installation en local avec WampServer
- Installation en local avec EasyPhp
- la réécriture d'URL l’utilisation conjointe des deux logiciels SPIP et Thélia
--alainormandie 19 septembre 2008 à 12:15 (CEST)