[pmwiki-users] (:linebreak:) as a global setting

Joachim Durchholz jo at durchholz.org
Tue Sep 26 16:26:54 CDT 2006

Patrick R. Michaud schrieb:
> ...except that one of the major purposes of headers is to
> set up a context that the main page uses (e.g., wikistyles,
> default table styling, or even (:linebreaks:)).  Putting
> the headers (and to a lesser extent, footers) into separate
> contexts somewhat negates one of the major purposes of having
> them.

Well, it seems we have two kinds of includable pages:

1) Those that should affect the including page (e.g. header).
2) Those that should not affect the including page (e.g. sidebars).

I'm not 100% sure, but I suspect that this is indeed a property of the 
page being included: some are meant to modify the calling context, some 
are not.

If that's indeed the case, we could control context modification with 
directives that changed the handling of this context.

If included pages would modify the includer's settings by default, we'd 
need these directives:
(:save-settings:) - Save all settings.
(:restore-settings:) - Restores the last unsaved set of settings.

If the included pages would not modify includer's settings by default, 
we could live with a single directive:
(:export-settings:) - Exports any settings changes to the including page.
(With this approach, PmWiki would do the equivalent of (:save-settings:) 
and (:restore-settings:) behind the scenes.)

There's one downside with this approach: any recipes that have global 
settings would have to register them with the core, so that the core 
knows to save and restore them.

> I'm applying PmWikiPhilosophy #3 until we have enough real-world
> instances where the existing approach is really unworkable.

I'd think that having cleanly separated include pages would help create 
wikitext building blocks that "just work".
Right now, a more ambitious sidebar may break including pages, or may be 
broken by the header - particularly if the skin loads the sidebar after 
the header.


More information about the pmwiki-users mailing list