Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
txp:excerpt rendering
I bet if we had a WTF!? forum category it would become more popular than How? or Troubleshooting in short order.
Anyway, here’s my WTF for the day since there’s no good other place for it…
I have this in an article form:
<txp:if_excerpt>
<p class="excerpt"><txp:excerpt /></p>
</txp:if_excerpt>
This placeholder text in the excerpt field:
About the site.
And it’s rendering like this in the front-end:
<p class="excerpt"></p>
<p>About the site.</p>
<p></p>
So basically two empty p
tag pairs, one with the class assignment, and the actual excerpt applied between them in a third paragraph instance.
WTF?! ;)
Offline
Re: txp:excerpt rendering
That is Textile doing!
Either turn of Textile for that excerpt field to change your markup slightly:
<txp:if_excerpt>
<div class="excerpt"><txp:excerpt /></div>
</txp:if_excerpt>
Edit:
Or, since you are using TXP 4.7dev, use the newly minted escape
attribute
<txp:if_excerpt>
<p class="excerpt"><txp:excerpt escape="p" /></p>
</txp:if_excerpt>
Last edited by phiw13 (2018-02-25 02:15:40)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: txp:excerpt rendering
So easy. Thank you!
Offline
Pages: 1