[pmwiki-users] Attach query string to all internal links

Martin Fick mogulguy at yahoo.com
Mon Mar 28 12:49:18 CDT 2011


--- On Mon, 3/28/11, Clemens Gruber <cgruber at uni-osnabrueck.de> wrote:
> Thanks for this idea, but I must use this wiki also in a
> variant without action=moodle, meens that I can not "hard
> code" it in a group header. Cookie is a solution but if a
> user uses the wiki in the moodle version and in the normal
> version the cookie can cause a wrong layout. So I think I
> have to drag along the unlovely parameter via search
> string.


If you look at:

http://www.pmwiki.org/wiki/Cookbook/DynamicWikiTrails

you will see that it defines a markup called (:trailindex:).
This markup does something very similar to what I believe
you want, it adds ?Trail=<trailindexpage> to every pagelink
on the current page (the current page is <trailindexpage>).


I always thought that perhaps a generic markup should be
created to do such a thing, something perhaps like this:

(:queryarg arg=value:)

which would add ?arg=value to the all pagelinks.  A
subsequent

(:queryarg foo=bar:)

on the same page would make it look like this:

 ?arg=value&foo=bar


I am sorry that I am not providing an implemented 
solution for you, but if you look at the way that
the recipe implements trailindex, you could probably
very easily implement the solution that I suggest 
above.

I hope that helps a bit,

-Martin



      



More information about the pmwiki-users mailing list