[pmwiki-users] Some way to return to common page holding two editable regions
Patrick R. Michaud
pmichaud at pobox.com
Mon Nov 14 08:49:54 CST 2005
On Mon, Nov 14, 2005 at 09:18:48AM -0500, Henrik Bechmann wrote:
> Thanks Patrick
>
> >>It can be done with some scripting in local/config.php, however.
>
> Can you point me to an example?
Depends on how fancy you need it to be. Actually, after thinking
about this just a bit, a very simple mechanism might be to simply
add
(:redirect MyPage:)
to MyPageSideBar, so that when editing is finished the author is
automatically returned to MyPage. This also generates the "
"redirected from MyPageSidebar" text at the top, but that can be
removed by placing the following in local/config.php:
$PageRedirectFmt = "";
Also, depending on how many sidebars you expect to have, the
per-page configurations could automatically handle the redirection,
place the following in local/Group.MyPageSidebar.php:
<?php Redirect('Group.MyPage');
The generic problem of remembering which page the author was at
when the sidebar's edit link is pressed is a bit trickier; it
requires passing along a return page in all of the edit requests
so PmWiki can redirect appropriately when the save is completed.
But this could be done also with a bit of work.
Pm
> Patrick R. Michaud wrote:
>
> On Sun, Nov 13, 2005 at 02:15:17PM -0500, Henrik Bechmann wrote:
>
>
> If I have two standard editable regions on a page (being <--PageText-->
> (where the current page is 'MyPage') and say <--wiki:MyPageSidebar-->,
> the sidebar containing content specific to the page), then I can cause
> edits with
>
> <a href='$PageUrl?action=edit'>$[Edit Page]
>
> and
>
> <a href='$ScriptUrl/MyPageSidebar?action=edit'>Edit Sidebar</a>
>
> But how do I get the latter to return to the former page, when hitting
> the "Save" button. IOW when editing MyPageSidebar, how can I return to
> MyPage rather than MyPageSidebar normal view after hitting Save?
>
>
> At present there's not a built-in mechanism in PmWiki to do this.
> It can be done with some scripting in local/config.php, however.
>
> Pm
>
>
>
More information about the pmwiki-users
mailing list