[pmwiki-users] Modes/views and (:include ..:) (Was: Supporting different modes )
chr at home.se
chr at home.se
Mon Aug 8 19:15:51 CDT 2005
On Mon, 8 Aug 2005, Patrick R. Michaud wrote:
> On Sun, Aug 07, 2005 at 07:17:23PM +0200, chr at home.se wrote:
> > > Combined with conditional markup we can show different skins for
> > > different 'audiences'.
> >
> > That sounds very reasonable. It's just a matter of how to "set" the mode
> > (and remember it). The difference between the modes can probably be done
> > quite extensively using (:if mode ...:).
>
> Don't forget there are other options besides conditional markup...
> in a skin template one can do:
>
> <!--wiki:Site.ActionLinks-$Mode Site.ActionLinks-->
Is there a reason why we couldn't make (:include:) behave in a similar
fashion, i.e. using
(:include Page1 Page2 Page3:)
Page1 will be included if it exists. If it doesn't exist, we check for
Page2. If that doesn't exist we check for Page3. Then we could just do:
(:include Site.ActionLinks-{$Mode} Site.ActionLinks:)
in the sidebar or whereever.
The potential problem I see is how something like
(:include Page1 Page2 Page3 lines=1..10:)
should be interpreted. Is it lines 1..10 for either of Page1, Page2
or Page3 (depending on which one that exists), or is it just lines
1..10 if Page3 is used?
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list