[pmwiki-users] Default Content for New Pages on Creation

Crisses crisses at kinhost.org
Sun Dec 17 19:16:42 CST 2006


On Dec 17, 2006, at 6:57 PM, Sivakatirswami wrote:

> I asked this on the 13th, got no answer... let's try again with less
> verbiage.
>
> Let's say in the URL bar  one enters, for a page that does not yet  
> exist:
>
> http://my.wiki.org/zap/index.php?n=NewProject.NewProject
>
> # this is meant to be a new home page for a new group-project
>
> Is there a way to have the new page be created with content
> already inserted? One would want it *only* for NewGroup.NewGroup
> home pages. Not other pages in the new group.

http://pmwiki.org/wiki/Cookbook/EditTemplates

You want it for pages in the NewGroup group?

If you only want it in one group, make a new file named NewGroup.php  
in the local/ folder, and tell it what page to use as the template.   
Many people use NewGroup.Template for example:

$EditTemplatesFmt = 'NewGroup.Template';

The page explains the options for you but please ask if you don't  
understand.

> Similarly, for within a given group where you want all new pages
> created, to have default content inserted
>
> Staff.NewVolunteer1
> Staff.NewVolunteer2
> etc
>
> to have these be "poked" automatically with some
> content on creation. Kind of like having a baby
> who already knows how to recite page lists.

The same page should help with this.

> The envision default content would be some carefully tailor pages  
> lists
> for presentation of future pages on these
> a) group home pages
> b) individual staff pages in single group "Staff"

Another way to get "default" content on every page in a group is to  
use either Group.GroupHeader or Group.GroupFooter

example:

(:pagelist link={*$FullName}:)

would be a list of all pages on the site linking to the current  
page.  {*$Var} means "Use the value for the current page" where  
{$Var} would be the value for GroupHeader or GroupFooter.  You don't  
want all pages referring to GroupHeader, you want all pages referring  
to the current page.

This would be automatically included for all pages in the group,  
without the chance that the editor would delete it by accident.  You  
can then password protect the GroupHeader or GroupFooter page so that  
editors can't mess up the automatically included text.

Crisses


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20061217/6b6b44e6/attachment.html 


More information about the pmwiki-users mailing list