[pmwiki-users] Templates for other actions (was: PmWiki	questions...)
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Wed Apr 25 11:42:01 CDT 2007
    
    
  
On Wed, Apr 25, 2007 at 10:23:51AM -0500, Ben Stallings wrote:
> It seems to me that an EditForm works very much like a GroupHeader or 
> GroupFooter, though I haven't looked into the workings closely enough to 
> see if they're processed exactly the same way.  
They aren't.  An EditForm is really something that is displayed in
response to ?action=edit, much like each of ?action=upload, ?action=diff,
?action=source, etc. all have their own specific output formats.
In the case of ?action=edit, it's simply that the page output comes
from either the value given by editform= or from Site.EditForm.
> If that's the case, then 
> the mechanism being used in ?editform=Group.Page could be generalized to 
> something like ?template=Group.Page that would work with any action, not 
> just edit.  
We have these mechanisms already:
    ?skin=
    (:include Template ... :)
    (:pagelist fmt=Template ... :)
> For example,
> http://example.com/pmwiki/Group/Page?action=print&template=Group.PrintTemplate
> would format pages in Group differently for printing than the rest of 
> the site.
This would normally be done with ?skin= .  It needs to be this way,
because formatting things for printing often involves more changes
than can be specified in page markup.
> You could then have default template locations for each action, so that 
> if there is no Group.EditForm, Site.EditForm will be used, and if 
> there's no Group.LocalTemplates then Site.LocalTemplates will be used, 
The new templating capabilities I'm building will allow templates
to be obtained from multiple sources, yes.
Pm
    
    
More information about the pmwiki-users
mailing list