[Pmwiki-users] menu of last-visited group

J. Meijer commentgg
Sat May 22 15:15:51 CDT 2004


I needed a menu of the group visited before going to the current group. The
code below maintains a $trail variable containing that groupname, which is
in turn used to display the menu.

The code functions well, but does not persist through the SUBMIT after
editing. How to remedy this?

This type of code might complicate page-caching.

-jm



------------------------------------------------------------------------

# Add menu of last visited group, the .tmpl must contain something like
#   <!--wiki:$trail.SideBar-->
if (isset($_GET['trail'])) $trail=$_GET['trail'];
$trail=explode('+',$trail);
$CurrentGroup=Currentgroup();
if ((count($trail)==1) or ($trail[1]==$CurrentGroup)) $trail=$trail[0];
else $trail=$trail[1];
output_add_rewrite_var('trail', $trail.'+'.$CurrentGroup);











More information about the pmwiki-users mailing list