[pmwiki-users] How to add anchors to WikiForms generated pages?
john.rankin at affinity.co.nz
Mon Apr 17 19:58:24 CDT 2006
On Tuesday, 18 April 2006 12:27 PM, John Rankin <john.rankin at affinity.co.nz> wrote:
>On Friday, 14 April 2006 7:21 AM, Bellave Jayaram <bellavejayaram at cox.net> wrote:
>>Hopefully, this is an easy question. I am looking at wikiform.php to see how
>>to add an anchor to a particular field (or all fields). For example, I have
>>a field called Description for which I would like to add begin and end
>>anchors, so that the page 00001 ends up looking like this:
>>[[#Desc]] <Description text> [[#DescEnd]]
>>when rendered in HTML. The reason for this is that I want to include only
>>this section in another page. I tried (:include 00001:) and it included the
>>whole page. How can I change wikiform.php so I can include only certain
>>fields in other pages?
>WikiForms provides a (:fpara field=Group.Page:) markup. This allows
>you to include the value of the specified field on another page. For
>example, (:fpara desc=Group.00007:) will insert the value of the desc
>field from page 00007.
>Please note that it uses the field name, not the field prompt text. If
>your form template looks like this, for example
>:Description:desc Description tool tip
>you use "desc" not "Description".
Depending on your requirements, you may also be able to use the new
ViewTemplate feature. If you need to change the layout of a single
page (that is, all the data come from the same page), you can define
a ViewTemplate page using <fieldname> where you want the value of a
given field to go. When you browse to the page, it uses ViewTemplate
to determine the page layout. This is slightly faster than the above
method, as it reads the page once and extracts all the field values,
then does the substitution. The (:fpara:) method extracts data one
field at a time, but allows you to compile data from multiple pages
into a single page.
More information about the pmwiki-users