Créer des modèles de pages (Namespace templates)

Ces modèles sont utiles lorsque l'on créé plusieurs pages dans le même genre. Ce qui est mis dans le modèle apparaîtra automatiquement à la création d'un document quand il est édité.

Par défaut, Dokuwiki utilise les fichiers suivtants comme modèles :

  • _template.txt : utilisé dans le “namespace” (répertoire) courant
  • _template.txt : utilisé dans le namespace courant et ses sous-namespaces

Remplacement de chamsps

Certaines syntaxes peuvent être utilisées pour remplacer automatiquement certains textes. A l'édition du nouveau document, elles seront automatiquement remplacée.

@ID@ full ID of the page
@NS@ namespace of the page
@PAGE@ page name (ID without namespace and underscores replaced by spaces)
@!PAGE@ same as above but with the first character uppercased
@!!PAGE@ same as above but with the first character of all words uppercased
@!PAGE!@ same as above but with all characters uppercased
@FILE@ page name (ID without namespace, underscores kept as is)
@!FILE@ same as above but with the first character uppercased
@!FILE!@ same as above but with all characters uppercased
@USER@ ID of user who is creating the page
@NAME@ name of user who is creating the page
@MAIL@ mail address of user who is creating the page
@DATE@ date and time when edit session started
%a %d-%m-%y etc. e.g. Thu 06-12-12. Strftime placeholders are replaced by page creation time
%% a literal % character appears in your template
modeles.txt · Last modified: 2015/01/10 20:02 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki