[Pmwiki-users] Re: Re: Action or form for creating a new page

Jonathan Scott Duff duff
Tue Feb 3 16:12:53 CST 2004


On Tue, Feb 03, 2004 at 11:58:11PM +0100, Christian Ridderstr??m wrote:
> On Tue, 3 Feb 2004, Jonathan Scott Duff wrote:
> 
> > On Tue, Feb 03, 2004 at 10:10:41PM +0100, Christian Ridderstr??m wrote:
> > > On Tue, 3 Feb 2004, Patrick R. Michaud wrote:
> > > > In MoinMoin, does selecting a page template happen via JavaScript or is
> > > > it a special link that is pressed that reloads the page with the desired
> > > > template?  How should it work if we do something like this in PmWiki?
> > > 
> > > It's quite straightforward in MoinMoin. You are first shown an 
> > > intermediary screen where you get to select between no template or one of 
> > > the existing ones (a template is just any wikipage with the name 
> > > starting (or maybe ending) in 'Template'.
> > 
> > For pmwiki I think we should forego the intermediary page and just put
> > the templates on the EditPage. This is already easy enough to do. And an
> > intermediary page seems like it would penalize those that don't want to
> > use templates. With a "special link" we can use any page as a template,
> > not just those that match '[a-z]Template$' Here's a not-too-creative
> > suggested markup:
> > 
> > 	[template:PmWikiPhilosophy]
> 
> First of all, let me restate that this choice of a template shold only 
> happen when the user is about to create a *new* page.

Okay ...

> Now, I'm not sure I follow. You say: "put the templates on the EditPage".. 
> do you mean adding links to EditPage, that will be there when you start 
> editing a new page?  

Yes.

> Will the template-links be there when you are editing 
> an already existing page?

Could be. I hadn't given it much thought. What if someone is editing an
existing page with very little content and decides that they really
would like to use one of the templates? If the template list isn't there
for editing existing pages, it becomes difficult for the author to use
templates in this situation.

> And [template:....], would that take PmWikiPhilosphy and give that as an 
> template alternative? Then, what is the result of clicking on such a link 
> -- is the result a page with an edit form that already contains the 
> contents of the template page?

Yep, that's the idea.

> In MoinMoin, you get a dynamically generated list of templates and 
> creating a template page is trivial. Any page name matching the pattern is 
> considered a template. Of course, I guess a similar effect could be 
> reached with a directive as follows:
> 
> 	[[template:[[:alnum:]]+Template$]]

In my scheme template pages need not have a consitent naming
convention; any wiki page would do.   The list of template pages
wouldn't be dynamic, but just another wiki page (just like the
PmWiki/EditQuickReference)

But if you wanted to use a consistent naming scheme, then generating a
dynamic list could be accomplished by using pmwiki's search routine. You
might need to add the ability to restrict the search to the titles only,
but I don't think that's too hard to do.

> Sorry if I'm becoming unclear here, it's bedtime here :-)

No, you're quite clear.

Go to bed!  Get some rest!  :-)

-Scott
-- 
Jonathan Scott Duff
duff at pobox.com



More information about the pmwiki-users mailing list