[pmwiki-users] wiki forms recipe interpretation of title

John Rankin john.rankin at affinity.co.nz
Thu Jun 19 22:00:04 CDT 2008


On Friday, 20 June 2008 4:55 AM, pmwiki-users-request at pmichaud.com wrote:
>Date: Thu, 19 Jun 2008 18:24:31 +0200
>From: "Michael Schaefer" <schaefermic at web.de>
>Subject: [pmwiki-users] wiki forms recipe interpretation of title
>	directive
>To: pmwiki-users at pmichaud.com
>
>The wiki forms recipe supports a (title) field type that treats the
>field contents as the text for a (:title:) directive. The recipe
>correctly inserts a title directive into the form based generated
>pages. Example:
>:Title:All You Can Eat
>(:title All You Can Eat:)
>But when using the {$Title} page variable in the ViewTemplate or the
>GroupHeader it only shows the page name and not the title. I would
>highly appreciate your help.
>
I *think* it's because the ViewTemplate code is missing a call to 
PCache for the retrieved page, but I'll have to build a test case 
to replicate the problem.

What happens if you temporarily disable the ViewTemplate page and
view the page as a normal wiki page? Does the {$Title} variable
display correctly?

You could also try the following code change:

In function FormValues, look for the line that reads
    $GLOBALS['PCache'][$pagename]['time'] = $page['time'];

Comment this out and replace it with

    PCache($pagename, $page);

Does this:
1. fix the problem?
2. break anything else?

Hope this helps.
-- 
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz





More information about the pmwiki-users mailing list