[pmwiki-users] (:includefieldpage:)
Henrik Bechmann
henrik at bechmannsoftware.com
Mon Nov 21 20:46:04 CST 2005
Thanks so much for all your feedback Patrick.
I've substituted
$dirspec = dirname($filespec);
$repository = new PageStore($dirspec . '/$FullName');
$ipage = $repository->read($thePageName);
for the part where I used my modified readpagefile(); the result is a
much simplified recipe (less than 70 lines of code).
When I write this up in the cookbook, I'll restore the #Start#End
functionality to be block oriented to be consistent with the core
(:include:) directive (though I'll have a note about the alternative - I
have no option but to use the alternative in my environment).
I already have a cautionary note about the bypassing of read
authorization, and will include this caution in the writeup.
Thanks again!
All the best,
- Henrik
Patrick R. Michaud wrote:
>On Sun, Nov 20, 2005 at 07:25:44PM -0500, Henrik Bechmann wrote:
>
>
>>1. I am using some PmWiki internals ($Imap, $FmtV, ParseArgs(),
>>LinkIMap()). Is this legitimate?
>>
>>
>
>Absolutely. These are not likely to ever change, and certainly
>won't change in the 2.x series.
>
>
>
>>2. Is this whole exercise legitimate? Right direction? Right approach?
>>(I'm guessing it's just a workaround for what Pm has planned, perhaps
>>(:include FieldName=>FieldGroup.GroupPage :), and perhaps some way of
>>marking pages to universalize links within the page to work throughout
>>the Farm).
>>
>>
>
>At the moment I don't have an "include page from field" feature
>planned. I do have a "make some pages shareable among several
>fields" feature planned, in which case one would use the standard
>(:include:) directive.
>
>One potential issue with doing cross-field includes in this manner is
>that any sitewide passwords of the remote field won't be applied to
>the included pages.
>
>
>
>>3. Is the inluded text, including the licencing text appropriate
>>(borrowed in general from the includewikipage cookbook directive)
>>
>>
>
>Looks fine to me -- since (:includefield:) is based on PmWiki's
>(:include:) code it has to be GPL-licensed.
>
>
>
>>4. Any and all feedback is welcome
>>
>>
>
>Duplicating the readpage() function seems to be very overkill --
>you should just be able to create a PageStore object that points
>to the field's wiki.d directory and then use it to read the pages.
>
>Pm
>
>
>
>
More information about the pmwiki-users
mailing list