Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-02-25 18:30:47

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 214
Website

Re: figcaption - searchable by default

This code seems to work for me so far — is it valid?

 	<figure<if::yield name="class"> class="<txp:yield name='class' />"</if::yield>>
<txp:image yield="id, class" />
		<txp:if_yield>
<figcaption><txp:yield escape="tidy,textile" /></figcaption>
		<txp:else />
<txp:image_info yield="id" escape="tidy,textile" wraptag="figcaption" />
		</txp:if_yield>
	</figure>

Edited: tidy breaks Textile URL quoting.
Edit 2: replaced ‹figcaption› by the same more robust wraptag.
Edit 3: pardon, tidy is innocent, it was my fault — the space is necessary after URL.

Last edited by Vienuolis (2020-02-27 21:06:34)

Offline

Board footer

Powered by FluxBB