DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:templatebyname

templatebyname Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown

plugin Plugin that extends the page template functionality. It makes it possible to create a template for a specific file name or templates for specific namespaces.

Last updated on
2013-08-17
Provides
Action
Repository
Source

Tagged with page, template

Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Examples/Usage

Create the page templates like you would create them when you use the basic page template functionality. page templates
With the plugin you can also specify a name:

  • _yourfilename.txt
  • __yourfilename.txt
  • ~yourdirectoryname.txt
  • ~~yourdirectoryname.txt
  • ~_yourdirectoryname.txt
  • ~~_yourdirectoryname.txt

Replace yourfilename or yourdirectoryname with a filename or directoryname you are going to use in you dokuwiki.

  • The _yourfilename.txt page template will only be used for a file in the current namespace with yourfilename as name.
  • The __yourfilename.txt page template will only be used for a file in the current namespace or namespaces below with yourfilename as name.
  • The ~yourdirectoryname.txt page template will be used for all files in the yourdirectoryname namespace wich resides just 1 level below the current namespace.
  • The ~~yourdirectoryname.txt page template will be used for all files in the yourdirectoryname namespaces below the current namespace.
  • The ~_yourdirectoryname.txt page template will be used for the file representing yourdirectoryname wich is just 1 level below the current namespace. In the file structure it will be the start.txt file.
  • The ~~_yourdirectoryname.txt page template will be used for the files representing yourdirectoryname for all namespaces below the current namespace.

Change Log

  • 2013-09-27
    • Cleaning up the plugin done by Klap-in.
    • Checked for compatibility with Adora Belle and Weatherwax.
  • 2012-06-04
    • Due to conflicts with Windows file name convention I replaced the asterisk (*) by the tilde (~). Everyone who already used the plugin, please rename your templates to the new convention when you update the plugin.
    • Solved a bug in the _yourfilename.txt and __yourfilename.txt convention.
  • 2012-06-01
    • Added the posibility to make a template for the start.txt files in a directory. (file representing the directory.)
  • 2012-04-25
    • Initial release

Known Bugs and Issues

  • none

ToDo/Wish List

  • none

Discussion

When you have a question or you want to give feedback. Please mail me or use https://github.com/jvanopstal/template-by-name/issues. Thank you.

plugin/templatebyname.txt · Last modified: 2018-11-30 09:35 by rnck