[dokuwiki] Re: Parameters in links revisited

On Thu, Dec 16, 2010 at 05:59:48AM -0600, Myron Turner wrote:
> On 12/16/2010 5:11 AM, Chris G wrote:
> >Just in case this was missed because I appended it to a very old thread:-
> >
> >>>Is it documented/explained anywhere yet?
> >>
> >>No I don't think so. But there's not much to explain. Just put your
> >>parameters in your link: [[some:page?foo=bar&baz=1|Title goes here]]
> >>
> >I'm just trying to use this and have a rather basic question.
> >
> >Having added a link like [[testpage?foo=astring&bar=12345|Test Page Name]]
> >how do I use those variables I have set?
> >
> >I.e. how do I get to use foo and bar in testpage?  What I specifically
> >want to do is to set a value in a template.  For example I am using the
> >sql plugin and want to select data based on a supplied value so I have a
> >line as follows:-
> >
> >     <sql db="sqlite:////var/www/boat/data/meta/boat.db" wikitext="enable" 
> > special="plain" ..>
> >     SELECT Description from bePlaces where Name like "%@location@%"</sql>
> >
> >I want to be able to have a link pointing to the page with the above in
> >it which specifies the contents of that "%@location@%".
> >
> >I realise the syntax to use the link parameters will be different, the
> >above is the syntax when using the template plugin.
> >
> While I've looked at it, I haven't worked with the sqlite plugin,
> nor as yet with the new query string facility, but my guess would be
> this.  You need a plugin which reads your name/value pairs from the
> $_REQUEST (or $_GET) object and replaces the sqlite place holders
> with the values. Since the sqlite plugin is a helper plugin, you
> must be using another plugin that is working with the sqlite plugin.
> It would be a good idea to create a hook into your wiki page from
> that plugin which  makes the replacements before sqlite is called.
OK, thanks, I'll try taking a look in $_REQUEST and $_GET and see if the
values are there.

Chris Green
DokuWiki mailing list - more info at

Other related posts: