netjunki/trac-NewPageMacro — pull request #3 by ejucovy (2012-09-28 03:08:43+00:00)
Title: Allow relative parent parameters, e.g. [[NewPage(parent=.)]]

Two special cases are hardcoded:

[[NewPage(parent=.)]]

[[NewPage(parent=..)]]

These will be resolved to the current page and the current page's parent, respectively;
in other words, the first version allows you to render a "Create Child Page" form,
and the second version allows you to render a "Create Sibling Page" form.

It's entirely possible that this is a very silly feature .. but when they're put into a PageTemplate (which also specifies itself as the template) it seems like it could be pretty powerful.

On the other hand, if this feature is accepted, it's arguable that it should be generalized so that you could also say `[[NewPage(parent=../MySibling)]]` or `[[NewPage(parent=../../..)]` .. I dunno though, that seems like a whole can of worms.