[pmwiki-users] Link to last visited page

Martin Kerz mkerz at me.com
Sat Feb 4 08:42:11 CST 2012

Thanks, Peter,

I agree, the first option looks ugly. Alas, your second option seems too complicated for my limited php skills, although I perhaps will have to end up trying it if my following idea doesn't work.

My reasoning is the following:

With pmwiki we have a perfect document based database using PTVs. So using FoxForms we could set a PTV containing the previous page name in a dedicated page. This way I could even use conditionals to prevent the setting of PTVs on e.g. dialogs (which basically are nothing more but wiki pages). Access would be more than easy using standard PTV markup.

I'll let you know if that works. If not … :-/

Thanks again!


Am 04.02.2012 um 15:16 schrieb Peter Bowers:

> On Sat, Feb 4, 2012 at 10:06 AM, Martin Kerz <mkerz at me.com> wrote:
>> can I somehow get the $FullName of the last visited page before the current one?
>> I would love to have something like {<$FullName} in wikitrails. Has anyone ever done this? It would be necessary for a cancel button in a jquerymobile cancel dialog.
> Here's one possibility -- maybe a bit ugly because it's visible to
> users who look in the address, but at least it may be a start...
> You could change the link format so that every link would always
> append a ?prevpage=Mygroup.Mypage and then you would have access using
> the appropriate $_GET['prevpage'].
> I don't remember exactly how I accomplished changing the link format
> (and I don't know whether it's the best way) but when I was doing my
> PageHist recipe I changed all links so that they maintained a
> ?asof=<date> from page to page.  You can see how I did it by checking
> out pagehist.php at http://www.pmwiki.org/wiki/Cookbook/PageHist.
> Another option would be to simply set a value in $_SESSION each time
> you load a page (you'll have to figure out where that can be done in
> config.php in terms of when sessions are initialized - seems like I
> had some trouble finding that point during some previous work but I've
> forgotten the details).  You could keep a whole list of history (last
> n pages) if you wanted to...  This has the benefit of not being
> visible to the user.
> HTH or at least gives some ideas that may get you started...
> -Peter

More information about the pmwiki-users mailing list