Re: [seGAP] templateIf syntax

  • Archived  

By ross - April 3, 2007


Thanks for posting!

I did some testing on this and it seems like the colon is actually optional so the template ifs will work with or without them.

Give it a shot from your end though and keep me up to date with you are making [:)].
Ross Fairbairn - Consulting

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting:

Re: [ross] templateIf syntax

  • Archived  

By seGAP - April 3, 2007

Thanks Ross,

We tested it in an Admin template (we haven't yet upgraded from v2.0), and got an error without the colon.

Error: Closing templateIf tag without opening tag in template content!

As soon as we put the colon in, it works fine.

So do you think this is something dating back to v2.0, or just in Admin?

Re: [seGAP] templateIf syntax

  • Archived  

By deniseb - April 4, 2007

Hi seGap,

Thanks for the follow-up!

It looks like you may need to have the colon in the Article Manager admin template files. I would suggest using the colon in both your website template files and your admin template files. :)

Does this help seGap? If you have any further questions please feel free to ask.

Re: [ChetW] templateIf syntax

  • Archived  

By seGAP - May 19, 2007


We're now on v2.13 and although we are using the Colon format for templateIf in our Admin templates, we just noticed by accident that if you miss the Colon then you don't get the error that v2.0 used to give, but any code within the templateIf seems to be executed unconditionally.

Are you able to confirm (or disprove) this at your end?

If it does turn out to be true, then the old error message was a better option than the behaviour that we seem to be getting.


Re: [seGAP] templateIf syntax

  • Archived  

By deniseb - May 20, 2007

Hi seGAP,

Thanks for the post!

I have been playing with this a little bit and it does look like a templateIf will work with or with out a colon in the admin templates. So far I hav been unable to re-create what you had mentioned. I would suggest the best thing here is to always use a colon in your templateIf's, whether it be on an admin template or a website temaplate. :)

Does this help? If you have any other questions please feel free to ask.