Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional statements or custom templates?
#1
Hello again

I have a conditional statement in my main template to output certain html based on the page slug. Up to now I thought this was a better solution than having to make more custom templates. However I think I saw a thread somewhere in the GS forum that mentioned page load time being affected by conditionals - can anyone advise which is better?

Thanks again

Kate
Reply
#2
kate Wrote:I have a conditional statement in my main template to output certain html based on the page slug. Up to now I thought this was a better solution than having to make more custom templates. However I think I saw a thread somewhere in the GS forum that mentioned page load time being affected by conditionals - can anyone advise which is better?

It depends on what you want to achieve. If the content editor needs to be able to choose a template based on subjective criteria, use multiple templates. If the content editor does not care or should not care, use conditional statements. And those will definitely NOT affect page load time (if you stay below a few hundred or so).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
Thanks, that's most helpful for the current small site and for future reference.
Reply




Users browsing this thread: 1 Guest(s)