Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Adding a caption to an image output by the Article Image field
jakob wrote #341178:
<txp:image_info wraptag="figcaption" class="myclass" />...
… you can avoid an empty figcaption being output if you don’t specify a caption.
yes that was magic. as before adding that, if one deleted the caption it still showed an outline around an empty string ( part of my css).
thanks all! I have it working fine. here is what I have
<txp:if_article_image>
<txp:images>
<figure>
<txp:image />
<txp:image_info wraptag="figcaption" class="velocaption" /> </figcaption>
<figure>
</txp:images>
</txp:if_article_image>
and I had to add the css for the class directly in the TxP form as it was never working by editing my css files… probably due to a lot of css crud in my style sheets. anyways for three captions it is good enough, for now. I will, in time correct the css style sheets, and get it working from that procedure . I am looking at the Powell course next week.
…. texted postive
Offline
Re: Adding a caption to an image output by the Article Image field
bici wrote #341188:
thanks all! I have it working fine. here is what I have
One tiny correction necessary: you can drop the closing </figcaption> – the wraptag attribute does that for you.
TXP Builders – finely-crafted code, design and txp
Offline