Pier FAQ

Useful links


Authoring Content

Q How can I redirect a page?
A Like this:
+value:redirect|to=/staff/oscar+
Q How can I advertise a changes feed?
A Include a link like this:
*RSS Feed>.|view=Changes (RSS)*
+>value:children|link|select=Page+

Usually this is placed in the sidebar, and is inherited by child pages, unless overridden. See SCG Wiki for an example.


Programming Pier

Q How do I update Pier?
A As follows:
Installer lukas project: 'pieraddons'; install: 'Pier-Setup'.
PRDistribution update.
Q How do I get the object representing a page?
A PRKernel instances anyOne root lookupPath: '/'
Q How do I programmatically create a new Pier page?
A Do something like this:
parent := PRKernel instances anyOne root lookupPath: '/'.
child := (PRPage named: 'newChild').
parent addChild: child.
child contents: 'tis a far better thing ...'.
Q How do I programmatically create a new Pier component?
A As above, but:
file := (PRFile named: self pierName)
	filename: self pierName;
	mimetype: (MAFileModel mimetypeFor: (self pierName copyAfterLast: $.));
	yourself.
parent addChild: file.

To be turned into a concrete example ... on


Last changed by admin on 21 April 2009