|
Cookbook /
IncludeFieldPageSummary: Extends the (:include:) directive functionality apply to pages from other fields of a wiki farm
Version: 1.0.0 - 22 November 2005
Prerequisites: requires at least PmWiki version: 2.0.0; last tested on PmWiki version: 2.0.13
Status:
Maintainer: Henrik Bechmann
DescriptionExtends the (:include:) directive functionality apply to pages from other fields of a wiki farm. This recipe creates a directive Caution: This directive bypasses all authorizations (ie. read authorization) for the included pages. Download includefieldpage.phpΔ to your cookbook directory. NotesTo use this directive:
Add farm-wide intermap entries for each fieldSuppose that you have two fields in your wiki farm which you name Holidays Parties You follow the convention of having a directory for each field, with a wiki subdirectory. You want to include pages from each field in the other. Then in your farmmap.txt file, add the following entries: HolidaysField: /myholidays/wiki/wiki.d/ PartiesField: /myparties/wiki/wiki.d/ Note the appending of the suffix To use the directive, if you have a PrivateParties group with a MyFirstParty page in the Parties field, and want to include that page in a Holidays page, you can write:
in a Holidays page. You can also write
or
to include partial pages by souce code line count, or name links placed in the source page. Follow intra-site link conventionsRelative addressing (for wikipages and images) in the context of one field will not work in another, so pages that will be included in other fields must follow link writing conventions which will resolve to correct addresses in any field context. The intermap facility can be used for this. For page links, you can set up intermap links in farmmap.txt like this: HolidaysWiki: /myholidays/wiki/wiki.d/wiki.php/ PartiesWiki: /myparties/wiki/widi.d/wiki.php/ and then rather than writing a link as MyGroup.MyPage, write it as:
This form will resolve in either field, should the page be included in the other field. For images, if you use the HolidaysAttach: /myholidays/wiki/uploads/ PartiesAttach: /myparties/wiki/uploads/ The Attach mechanism places uploaded files in subdirectories named by group, so you would then write
instead of
to make the link work in any field context. ReleasesVersion 1.0.0 November 22, 2005. Basic Release CommentsSee AlsoInterMap links ContributorsHenrik Bechmann (Henrik@BechmannSoftware.com) |