[pmwiki-users] NewPageBoxPlus and autosaving new pages

Philip Stitt phil at octopusmusic.com
Mon Mar 20 13:05:38 CST 2006

Hello everyone,

I am using a newpagebox (newpageboxplus) that is set to create a new
page (called SomeNewGroup.HomePage) using a template. It is set to
save=true, so that it automatically saves the new page upon creation.

The template page, which is called PageTemplates.HomePage, also has
several newpageboxes on it, which also are set to create pages based on
templates (like PageTemplates.GroupHeader, PageTemplates.GroupFooter,
etc.). This is so that a user can quickly create the essential,
pre-configured pages of a standard group. The newpageboxes actually
look like this:

(:newpagebox value={$Group}.GroupHeader
template=PageTemplates.GroupHeader save=true:)

So the first page that is created is "SomeNewGroup.HomePage", and on
that page are all of the newpageboxes used to create the other pages.
When I click the button to create SomeNewGroup.GroupHeader, nothing
happens. But if I open SomeNewGroup.HomePage in edit mode, and then
click "cancel" or "save" (but not actually edit anything)... or if I
simply recall the page (not refresh it, but click a self-link, for
example), then everything seems to work fine, and all the newpageboxes
work. Otherwise I just end up back at SomeGroup.HomePage.

So there's that, and I had another question that relates: 

I was thinking of using page templates so that whenever a new page
called HomePage was created (not using newpagebox), it would use the
template from PageTemplates.HomePage. I know how to make new pages
named "HomePage" use a template, but is there a way to also make them
"auto-save"? Say you click a link to [[ {$Group}.GroupHeader]], in a
group where there is no GroupHeader page yet. It would automatically
create and save the new page for you, like newpageboxplus can. Is this
doable? This would be something that could be used if the first problem
can't be resolved.


More information about the pmwiki-users mailing list