Keyword

change empty categories style

  • claude Sainjon
  • claude Sainjon's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #107827 by claude Sainjon
change empty categories style was created by claude Sainjon
Hi,

I have a subdirectory list with their icons only
these icons are country flags.
I'd like to know if it's possible to remove the link to the items and make the picture a bit transparent is the categorie is empty

Attachment not found

Attachments:

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

More
11 years 9 months ago #107828 by william white
Replied by william white on topic Re: change empty categories style
You might try to make two copies of the image, one with a different name say image.noitems.jpg
Put the new images alongside the standard k2 category images in /media/k2/categories
Create a k2 override template file
edit category_php and place and if statement in the image display section
psudo code
if category has no items
display image .notitems jpg
else
do regular dispaly
endif
You will have to parse the regular item image name and reconcatnate it if you want to show the second image.
k2 will not upload the secondary image, you will have to do that yourself, so it wont be automatic when creating new categories

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

  • claude Sainjon
  • claude Sainjon's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #107829 by claude Sainjon
Replied by claude Sainjon on topic Re: change empty categories style
Thank you very much for your quick answer
sorry to be so late but I had to search for doctors ....
I will try that as soon as I can
Claude

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


Powered by Kunena Forum