Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-09-10 08:54:52
- bmwg
- Member
- Registered: 2010-04-06
- Posts: 39
Get rid of <p> tag around <txp:body>
I’d like to use a certain class of the <p> tag to wrap around <txp:body /> in an article form.
<p class="myClass">
<txp:body />
</p>
However my output looks like
<p class="myClass"> <p>
text </p>
</p>
How do I get rid of this inner <p> tag?
Offline
Re: Get rid of <p> tag around <txp:body>
Why not simply do: <div class="myclass"><txp:body /></div>
Offline
#3 2010-09-10 10:07:32
- bmwg
- Member
- Registered: 2010-04-06
- Posts: 39
Re: Get rid of <p> tag around <txp:body>
Thanks!
Offline
Re: Get rid of <p> tag around <txp:body>
Just for future reference, I found a fairly simple way with rss_auto_excerpt, at least for a single paragraph article…
<txp:rss_auto_excerpt paragraphs="1" showlinkwithexcerpt="0" striptags="1" />
Offline
#5 2011-08-05 13:49:58
- vurt
- Member
- Registered: 2010-10-22
- Posts: 50
Re: Get rid of <p> tag around <txp:body>
If you willing to hand-code the markup in all of your articles (no Textile):
Admin > Preferences > Basic > Use Textile > Leave text untouched
or to limit to the individual article (you’ll have to add all of the markup):
Write > Advanced Options > Article Markup > Leave text untouched
Your article form could be something like:
<div class="article">
<h3><txp:title /></h3>
<txp:body />
</div>
So when writing your article <txp:body /> the markup could potentially be:
<p class="myClass">text</p>
<p class="anotherClass">text</p>
<p>etc.</p>
Offline
Pages: 1