19a366708SLORTET====== Newpagefill Plugin ====== 29a366708SLORTET 39a366708SLORTET---- plugin ---- 49a366708SLORTETdescription: Page creation helper with prefill and @TITLE@ support 59a366708SLORTETauthor : Valentin LORTET 69a366708SLORTETemail : contact@valentinlortet.fr 79a366708SLORTETtype : Action 89a366708SLORTETlastupdate : 2026-03-13 99a366708SLORTETcompatible : Librarian 109a366708SLORTETdepends : 119a366708SLORTETconflicts : 129a366708SLORTETsimilar : 139a366708SLORTETtags : Page, Creation, Template, Namespace, JavaScript 149a366708SLORTET 159a366708SLORTETdownloadurl: https://github.com/Lortet/dokuwiki-plugin-newpagefill/zipball/master 169a366708SLORTETbugtracker : https://github.com/Lortet/dokuwiki-plugin-newpagefill/issues 179a366708SLORTETsourcerepo : https://github.com/Lortet/dokuwiki-plugin-newpagefill/ 189a366708SLORTETdonationurl: 199a366708SLORTETscreenshot_img : 209a366708SLORTET---- 219a366708SLORTET 22*3f49ec0bSLORTET[[fr:plugin:newpagefill| Français]] | **English** | [[de:plugin:newpagefill| Deutsch]] | [[es:plugin:newpagefill| Español]] 23*3f49ec0bSLORTET 249a366708SLORTET===== Installation ===== 259a366708SLORTET 269a366708SLORTETInstall the plugin from the [[plugin:extension|Extension Manager]]. 279a366708SLORTET 289a366708SLORTET===== Description ===== 299a366708SLORTET 309a366708SLORTETThe **newpagefill** plugin adds a lightweight helper to create a new page: 319a366708SLORTET * enter a title; 329a366708SLORTET * automatically suggest a page ID; 339a366708SLORTET * optionally enter the namespace; 349a366708SLORTET * choose the creation mode depending on configuration; 359a366708SLORTET * open the editor directly on the target page. 369a366708SLORTET 379a366708SLORTETIt also complements the native DokuWiki template system: 38*3f49ec0bSLORTET * use ''_template.txt'' or ''%%__template.txt%%'' when available; 399a366708SLORTET * add support for the ''@TITLE@'' placeholder in the injected content; 409a366708SLORTET * fall back to a plugin-specific template when no native template exists. 419a366708SLORTET 429a366708SLORTET===== Settings ===== 439a366708SLORTET 449a366708SLORTET^ Name ^ Description ^ Default value ^ 459a366708SLORTET| template | Fallback template used when no native DokuWiki page template is found. | ''===== @TITLE@ ====='' | 469a366708SLORTET| default_start_mode | Default creation mode. | ''start'' | 479a366708SLORTET 489a366708SLORTETPossible values for ''default_start_mode'': 499a366708SLORTET * ''ask'': show a selector in the dialog; 509a366708SLORTET * ''start'': create a start page; 519a366708SLORTET * ''none'': create a direct page; 529a366708SLORTET * ''same'': create a subpage with the same name. 539a366708SLORTET 549a366708SLORTET===== Placeholders ===== 559a366708SLORTET 569a366708SLORTETThe plugin template may contain: 579a366708SLORTET * ''@TITLE@'': title computed by the plugin (specific to newpagefill); 589a366708SLORTET * all native DokuWiki placeholders: ''@ID@'', ''@NS@'', ''@PAGE@'', ''@USER@'', ''@DATE@'', etc. (handled by DokuWiki core, not by this plugin). 599a366708SLORTET 609a366708SLORTET===== @TITLE@ behaviour ===== 619a366708SLORTET 629a366708SLORTETThe value of ''@TITLE@'' is computed as follows: 639a366708SLORTET * the request ''title'' value has priority; 649a366708SLORTET * otherwise, the plugin tries to extract a title from the creation URL; 659a366708SLORTET * if the created page is the namespace start page, the parent namespace name is used; 669a366708SLORTET * ''_'' characters are replaced with spaces. 679a366708SLORTET 689a366708SLORTET===== Template compatibility ===== 699a366708SLORTET 709a366708SLORTETThe plugin follows this order: 719a366708SLORTET * template already provided by DokuWiki; 729a366708SLORTET * ''_template.txt'' in the target folder; 73*3f49ec0bSLORTET * %%__template.txt%% in the current or parent namespace; 749a366708SLORTET * fallback template configured in the plugin. 759a366708SLORTET 769a366708SLORTET===== JavaScript function ===== 779a366708SLORTET 789a366708SLORTETThe plugin exposes the global function: 799a366708SLORTET 809a366708SLORTET<code javascript> 819a366708SLORTETwindow.NewPageFill.openCreatePageDialog(options) 829a366708SLORTET</code> 839a366708SLORTET 849a366708SLORTETExample: 859a366708SLORTET 869a366708SLORTET<code javascript> 879a366708SLORTETwindow.NewPageFill.openCreatePageDialog({ 889a366708SLORTET namespace: 'wiki:documentation', 899a366708SLORTET initialTitle: 'New page' 909a366708SLORTET}); 919a366708SLORTET</code> 929a366708SLORTET 939a366708SLORTETUseful options: 949a366708SLORTET * ''namespace'': target DokuWiki namespace; 959a366708SLORTET * ''initialTitle'': prefilled title; 969a366708SLORTET * ''start'': 979a366708SLORTET * ''undefined'' or ''null'': use the plugin configuration; 989a366708SLORTET * ''@ask@'': force the mode choice dialog; 999a366708SLORTET * ''true'': use the wiki start page; 1009a366708SLORTET * ''false'': create the page directly; 1019a366708SLORTET * ''@same@'': create a subpage with the same name as the page ID; 1029a366708SLORTET * any other string: create a subpage with that value; 1039a366708SLORTET * ''sepchar'': separator used to generate the page ID. 1049a366708SLORTET 1059a366708SLORTETIf ''start'' is not provided and ''default_start_mode = ask'', the dialog offers: 1069a366708SLORTET * direct page; 1079a366708SLORTET * start page; 1089a366708SLORTET * subpage with the same name. 109