-1

Want to know how to make sure a template only gets used when we want it

Our main article template for our columns runs ads

I need a template that has no ads for one of our authors. How do I ensure there is no bleeding of content onto the wrong template

1 Answer 1

1

You could just use a conditional to display, or not display the ads. So if the content author is anyone but the said author, show ads. If it is them, it won't show the ads:

{if author_id != "xx"} < Ad Code Here > {/if}

Just put the author's id in place of the "xx".

5
  • And/or use different group and use group_id instead of author_id.
    – Benoit L
    Jan 11, 2018 at 21:41
  • will the conditional work for the template {if author_id != "xx"} use a template Jan 11, 2018 at 22:57
  • Sorry, can you clarify that? Do you mean the ad code is coming in from an embed? If so, yes, it should work. And Benoit L's suggestion about a different group is good if there could ever be more than just this one author with this restriction.
    – Jeremy
    Jan 12, 2018 at 4:40
  • it is nothing about ads. our regular template has ads, they want a template without ads. I can do this. but in the past i noticed that there is nothing stopping the system from assigning the ads free template to the regular template. I use to run specialiaty templates for health, automotive and travel pages. I would get auto pages on travel templates showing up in google Jan 12, 2018 at 12:37
  • You're losing me and over-complicating this. You have an answer how to use your existing templates, and have ads not show when a specific author's content is shown. That was the question you asked. It was answered. Please mark it as such. If you have another question about whatever template issues you are having, then start a new question rather than piggy-back on this one.
    – Jeremy
    Jan 12, 2018 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.