<div dir="ltr">Petko, <div>that would be brilliant, thanks very much<div><br></div><div>Simon</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 3 Feb 2024 at 21:45, Petko Yotov <<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We could add it. Would something like this this be convenient:<br>
<br>
$EditTemplatesFmt[] = '{$SiteGroup}.MapsTemplate name=*map,*maps';<br>
<br>
This would work like the name= argument in pagelists and other <br>
directives, and the template Site.MapsTemplate will only be loaded on <br>
pages that match the specification.<br>
<br>
Petko<br>
<br>
<br>
On 03/02/2024 00:07, Simon wrote:<br>
> Using PmWiki | Cookbook / EditTemplates [1] it is possible to<br>
> "pre-fill" a new page from a templates, e.g.<br>
> <br>
> $EditTemplatesFmt [2] = '{$SiteGroup}.{$Name}Template';which looks in<br>
> the Site group for a template matching the name of the page being<br>
> created. For example, the above would use "Site.HomePageTemplate" (if<br>
> it exists) anytime an author creates a page named "HomePage" (in any<br>
> group).<br>
> <br>
> I'm looking for something that moves this up a notch by marching the<br>
> new page name, e.g.<br>
> $EditTemplatesFmt['pattern'] = ['*some?text*',<br>
> 'SomeTemplatePagename'];<br>
> i.e. to be able to specify a pattern (normal or regex) that when<br>
> matched against a "new" page name successfully specified the page to<br>
> be used as the template<br>
> for example<br>
> $EditTemplatesFmt['pattern'] = ['*maps', 'MapsTemplate'];<br>
> <br>
> Or ideas on how to implement this?<br>
> <br>
> thanks very much<br>
> <br>
> Simon<br>
> <br>
> Links:<br>
> ------<br>
> [1] <a href="https://www.pmwiki.org/wiki/Cookbook/EditTemplates" rel="noreferrer" target="_blank">https://www.pmwiki.org/wiki/Cookbook/EditTemplates</a><br>
> [2] <a href="https://www.pmwiki.org/wiki/PmWiki/EditVariables#EditTemplatesFmt" rel="noreferrer" target="_blank">https://www.pmwiki.org/wiki/PmWiki/EditVariables#EditTemplatesFmt</a><br>
> _______________________________________________<br>
> pmwiki-users mailing list<br>
> <a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
> <a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</blockquote></div>