[pmwiki-users] Passing arguments to a PmWiki page

Harry Forsdick harry at forsdick.com
Mon Jul 13 06:53:44 CDT 2009


Hiere is an idea I have had about how to do this.  I am not sure it will
work, so I want to pass it by this group for comments.

My original problem is:

Part of my PmWiki based website has a page where product items are presented
in a short form.  For each item listed I would like to have a link to a
single "ItemDetails" page to which I can pass arguments.  This way, I can
create just one page whose content changes based on the arguments passed to
it.

Here is the solution I have come up with:

   1. For each item in the page listing the short descriptions of product
   items, include a directive to produce a link to the single "ItemDetails"
   page (Store.ItemDetails) encoding GET arguments at the end of the URL.  The
   directive would look like:

   (:LinkWithArgs Store.ItemDetails linktext='XXX' arg1=value1 arg2=value2
   ... :)

   2. The HTML code emitted would be:

   <a href="http://wikihost.com/index.php?n=Store.ItemDetails
   &arg1=value1&arg2=value2">XXX</a>

   3. On the page Store.ItemDetails, I need to include a directive that
   retrieves the arguments as page text variables:

   (:GetArgs:)

   I'm not sure how to write this directive.

So my questions are:

   1. Will this strategy work?

   2. I know how to write the (:LinkWithArgs:) directive, but I'm not sure
   how to write the (:GetArgs:)directive to get the list of arguments
   provided with the link and set them as page text variables in the
Store.ItemDetails
   page.

Thanks.

-- Harry

----
Harry Forsdick
New: (781) 923-0123 (Google Voice)
http://forsdick.com  |  http://lexmedia.org  |  http://lexmarketplace.org |
http://forsdick.blogspot.com  |  http://lexdig.com


On Mon, Jul 13, 2009 at 7:00 AM, Harry Forsdick <harry at forsdick.com> wrote:

> I should expand my question a bit:
>
> Is there any way to pass such arguments using the notation [[Group.Name]].
> I tried some obvious notations such as:
>
>    [[Group.Name?arg1=xxx&arg2=yyy]]
>
> but that didn't work.
>
> And also, is there some standard configuration or cookbook recipe for
> retrieving such argument-value pairs?
>
> Thanks
>
> -- Harry
>
> ----
> Harry Forsdick
> New: (781) 923-0123 (Google Voice)
> http://forsdick.com  |  http://lexmedia.org  |  http://lexmarketplace.org|
> http://forsdick.blogspot.com  |  http://lexdig.com
>
>
> On Mon, Jul 13, 2009 at 6:53 AM, Harry Forsdick <harry at forsdick.com>wrote:
>
>> That would be fine.  I'm a bit of an amateur with PmWiki.  How would I do
>> what you suggest?
>>
>> -- Harry
>>
>> ----
>> Harry Forsdick
>> New: (781) 923-0123 (Google Voice)
>> http://forsdick.com  |  http://lexmedia.org  |  http://lexmarketplace.org|
>> http://forsdick.blogspot.com  |  http://lexdig.com
>>
>>
>> On Mon, Jul 13, 2009 at 3:38 AM, Oliver Betz <list_ob at gmx.net> wrote:
>>
>>> Harry Forsdick wrote:
>>>
>>> >Part of my PmWiki based website has a page where product items are
>>> presented
>>> >in a short form.  For each item listed I would like to have a link to a
>>> >single "ItemDetails" page to which I can pass arguments.  This way, I
>>> can
>>> >create just one page whose content changes based on the arguments passed
>>> to
>>> >it.
>>>
>>> if you want really link to a page, I think the only way is to pass GET
>>> parameters and make them available as page variable.
>>>
>>> Oliver
>>>
>>>
>>> _______________________________________________
>>> pmwiki-users mailing list
>>> pmwiki-users at pmichaud.com
>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090713/38b661fe/attachment-0001.html 


More information about the pmwiki-users mailing list