Insert image from custom field path?
-
Is it possible to create a loop, that does something similar to this:
if
[customfield-value] is not empty
then
insert image src: ../images/customfield-value.jpg
else
insert image src: ../images/default.jpg
endNarrowing it down to questions:
1. can i make the custom field part of my img src path?
2. my custom field value will be containing spaces – will that result in a problem?Eksample: I have a custom field with the value of a name etc “John Smith”, i have manually uploaded a thumbnail picture to my server (../images/) called “John Smith.jpg”, now i want to display that picture. However if the custom field does not contain a name (=null), then i just want to display a default thumbnail (..images/default.jpg).
Hope it makes sense and that some of you guys can help me ??
- The topic ‘Insert image from custom field path?’ is closed to new replies.