[pmwiki-users] Conditionals in Templates
Scott
scott at judyscot.org
Fri Sep 24 06:11:08 CDT 2010
On 9/24/2010 2:28 AM, Petko Yotov wrote:
> On Friday 24 September 2010 03:16:07 Scott wrote:
>> I am trying to use a conditional statement in my template:
>>
>> (:if ! group Main:)
>> <!--wiki:Main.SideBar Main.SideBar-->
>> <hr>
>> (:ifend:)
>> <!--wiki:$Group.SideBar Main.SideBar-->
>>
>> Unfortunately, this just outputs the conditional. I also tried the php
>> variant and a few other things.
>>
>> What is the correct way to accomplish this?
> Hello. If you want to always display the Main.SideBar page, just use
> <!--wiki:Main.SideBar-->
>
> Otherwise, it is simpler to place the conditionals inside the pages, and not
> in the templates.
>
> Thanks,
> Petko
If I wanted it on all pages, I wouldn't need the conditional. :-)
I think it would be simpler from a maintenance stand point to have it in
the template. I basically want the Main side bar followed by the group
side bar. But on the main page, it would be redundant to have the main
twice.
If this isn't possible, that's ok, I'll re-imagine it.
-Scott
More information about the pmwiki-users
mailing list