SectionList

Summary: A nice way to do formatted displays of anchored sections of data on a page.
Version: 2007-05-02
Prerequisites: PmWiki
Status: Under Development
Maintainer: (unsupported since 2008)
Categories: Markup

Questions answered by this recipe

Q. How can I separate form content from format in something like a bunch of comments on a page, without having to store each comment on a separate page, and use a pagelist.

A. Use a Section List!

Download

sectionlist.phpΔ

Note this is automatically included in the ZAPtoolbox, so do not use this script if you have the ZAPtoolbox enabled. Otherwise, enable as normal.

How to use

First, you must use create a "datapage" that looks something like the following. Often you would use ZAP or Fox or something similar to automate this process but you can do it manually if you wish. : )

[[#IDkey1]]
field1: var
field2: var
field3: var

[[#IDkey2]]
field1: var
field2: var
field3: var

[[#IDkey3]]
field1: var
field2: var
field3: var

Second, create a template page that looks something like the following:

Posted by {$$author}, at {$$time}
Comments: {$$post}

Finally, on the page you want to display the formatted display, simply put this markup. The parameter labels are not required:

(:sectionlist data=Group.Name fmt=Group.Name:)

Release Notes

2007-05-02 First released. A few problems still need to be worked out. I posted the code hoping someone else might be able to get the markup processing to work fully.

Contributors

  • Caveman Click here to learn more about the story behind this recipe...
  • Many others who have suggested countless ideas along the way.

Comments

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.