[Moin-user] conditional rendering

R.Bauer rb.proj at gmail.com
Tue Aug 11 11:21:34 EDT 2009

John Marshall schrieb:
> John Marshall wrote:
>> Hi,
>> 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?
> Hmm. Am I the only one who has wanted to do
> this sort of thing?

you could add a new keyword to Include and add a div container and some
css to render different if that is used.


More information about the Moin-user mailing list