[Moin-user] conditional rendering

John Marshall John.Marshall at ec.gc.ca
Sun Aug 2 17:45:28 EDT 2009


I am developing a number of pages which are intended
to be included using the Include() macro, however I want
to be able to have some markup rendered differently
based on whether the a page is being requested (the
actual request) or included. The point of the conditional
markup is to be able to indicate that the pages are to be
included, not used directly.

My initial idea is to create a simple parser which renders
(using the original parser) or not depending on if the
    page_name == request.page_name

Of course, a macro could be used if only a small snippet
of text was required.

Any suggested alternatives to doing things this way?

Thanks again,

More information about the Moin-user mailing list