Keyword

How to hide empty image extrafield ?

  • Peter Grube
  • Peter Grube's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 9 months ago #108090 by Peter Grube
How to hide empty image extrafield ? was created by Peter Grube
I everyone,

I am having trouble in regards to the Image extrafield, If the the field is empty it displays the field name as alt text, does anyone have any idea how make it not do this.

thx in advance Pete.

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

More
11 years 9 months ago #108091 by william white
Replied by william white on topic Re: How to hide empty image extrafield ?
I havent used it but, i would start by inserting an if statement into the foreach loop that displays extra fields and test for either the existance of the image if the field is an image type
There must be a default string if there is no image and you could test for that

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

  • Peter Grube
  • Peter Grube's Avatar Topic Author
  • Offline
  • Elite Member
More
11 years 9 months ago #108092 by Peter Grube
Replied by Peter Grube on topic Re: How to hide empty image extrafield ?
Hi William,

I didn't explain problem correctly in previous post the alt text only gets displayed when displaying as a individual extra field, this is the code & if, seems to work fine for other extrafield types can you let me know if the code looks ok please ?

I tried to set a default image but that doesn't seem to work either.
Log in  or Create an account to join the conversation.