Keyword

How to show cat. description only if it has text ?

  • Uldis
  • Uldis's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago - 11 years 10 months ago #106687 by Uldis
Hello!

I'm using k2 template overrides and I have styled category descriptions, with 2 additional divs.

Problem is that some categories will not have description, I know I could turn off category option "Show cetegory description", but all categories inherit parameters from 1 category.

Would it be possible to specify something like ?
Log in  or Create an account to join the conversation.

More
11 years 10 months ago #106688 by william white
Replied by william white on topic Re: How to show cat. description only if it has text ?
You will need to override the category_php file and put a test for the desc field to determine if it has text, show if it does, skip if it does not

Please Log in or Create an account to join the conversation.

  • Uldis
  • Uldis's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106689 by Uldis
I'm sorry for asking this, but I'm not very familiar with php, could you please tell me which function I should use ?

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #106690 by william white

Please Log in or Create an account to join the conversation.

  • Uldis
  • Uldis's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106691 by Uldis
Thank you, I will read it.

Please Log in or Create an account to join the conversation.