- Posts: 69
COMMUNITY FORUM
How to show cat. description only if it has text ?
- Uldis
-
Topic Author
- Offline
- Senior Member
Less
More
12 years 6 months ago - 12 years 6 months ago #106687
by Uldis
How to show cat. description only if it has text ? was created 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 ?
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.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 6 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
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 69
12 years 6 months ago #106689
by Uldis
Replied by Uldis on topic Re: How to show cat. description only if it has text ?
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.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 6 months ago #106690
by william white
Replied by william white on topic Re: How to show cat. description only if it has text ?
Please Log in or Create an account to join the conversation.
- Uldis
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 69
12 years 6 months ago #106691
by Uldis
Replied by Uldis on topic Re: How to show cat. description only if it has text ?
Thank you, I will read it.
Please Log in or Create an account to join the conversation.