[pmwiki-users] Different Templates for $Group
Knut Alboldt
pmwiki at alboldt.de
Sun Mar 20 17:16:11 CST 2005
Patrick R. Michaud schrieb:
> On Thu, Mar 10, 2005 at 05:13:27PM -0500, Tom Holroyd wrote:
> ... snip ...
> stuff in the wiki itself. For example, one can generate a list
> of editing-via-template items by using markup such as:
>
> * [[{$FullName}?action=edit&template=Group/SomeTemplate1]]
> * [[{$FullName}?action=edit&template=Group/SomeTemplate2]]
> * [[{$FullName}?action=edit&template=Group/SomeTemplate3]]
>
I tried to use this in a edit-specific SideBar (see another mail from
Pm, text below)
{$FullName} did not work (yet ?), so I used {$Group}/}$Name} instead.
If I enter the edit-mode the edit-specific sidebar will contain these
links above so the author can click a template link to get the same new
pagename but with the edit-template loaded.
But when I create a new page, the edit-specific sidebar with the links
above will be displayed but the "&template...." will be truncated from
the link. This does not happen, when I edit an existing page so in that
case the link will be ok including the template-parameter.
Did I made something wrong ?
Knut
------------------
attached: solution for the edit-specific sidebar
On Fri, Feb 04, 2005 at 01:04:27PM +0100, Knut Alboldt wrote:
>> Hans schrieb:
>
>>> >replace in your skin tmpl file
>>> ><!--wiki:$Group.SideBar Main.SideBar-->
>>> >with <!--wiki:$Group.$SideBar Main.$SideBar-->
>>> >
>>> >add to config.php:
>>> >$SideBar = 'SideBar';
>>> >if ($action=='edit') $SideBar = 'EditBar';
Wow, this is an excellent solution -- nice thinking. Here's another
that doesn't involve code in config.php... use this in your
skin tmpl file:
<!--wiki:$Group.SideBar-$action Main.SideBar-$action $Group.SideBar
Main.SideBar-->
For ?action=edit, this uses the first of
Group.SideBar-edit
Main.SideBar-edit
Group.SideBar
Main.SideBar
Just create which ever page is most appropriate. And don't forget that
Group.SideBar-edit can (:include {$Group}.SideBar:) if desired. :-)
Pm
More information about the pmwiki-users
mailing list