1

{exp:ce_img:single} or the like outputs <img> tags.

Is there a way in CE to make it only output the @src value only?

2 Answers 2

5

There are a few different ways to go about this, but the most succinct is probably to use the url_only= parameter:

{exp:ce_img:single src="{your_custom_field}" url_only="yes" width="200"}

You could also customize the output using the output= parameter:

{exp:ce_img:single src="{your_custom_field}" output="{made}" width="200"}

Or use the made variable in a pair tag (like Max pointed out):

{exp:ce_img:pair src="{your_custom_field}" width="200"}{made}{/exp:ce_img:pair}
1
  • I don't know how I could have missed url_only in the documentation but thanks for the prompt reply! Commented May 29, 2014 at 5:26
3

Use :pair tag

{exp:ce_img:pair src="{your_custom_field}"}
<img src="{made}" alt="" width="{width}" height="{height}" />
{/exp:ce_img:pair}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.