Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How can I remove line-break elements from txp:linklist?
Hi!
I have the following code:
<txp:linklist
break="li"
class="myClass"
wraptag="ul"/>
I was expecting output like this:
<ul class="myClass">
<li><a href="http://example.com/?link=1">Link 1 Title</a></li>
<li><a href="http://example.com/?link=2">Link 2 Title</a></li>
</ul>
But Textpattern seems to be inserting br
elements before the close of each li
element:
<ul class="myClass">
<li><a href="http://example.com/?link=1">Link 1 Title</a><br /></li>
<li><a href="http://example.com/?link=2">Link 2 Title</a><br /></li>
</ul>
Usually, declaring a break
attribute in a TXP tag gets rid of any default breaks, but in this case I’m seeing both.
I could easily filter out the line-break elements with rah_replace or pax_grep, but I was wondering if there’s a toggler in the tag or in the preferences that I don’t know about.
Thank you!
Edit: Fix textile. D’oh!
Last edited by johnstephens (2011-08-25 19:36:34)
Offline
Re: How can I remove line-break elements from txp:linklist?
You didn’t specify a form, so could it be that there is a <br/>
in the default form it is using, for example it seems that the default plainlinks form has one.
TXP Builders – finely-crafted code, design and txp
Offline
Re: How can I remove line-break elements from txp:linklist?
Offline
Re: How can I remove line-break elements from txp:linklist?
Aha, thank you both! I knew that, but I forgot.
Offline
#5 2011-08-25 20:01:39
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How can I remove line-break elements from txp:linklist?
johnstephens wrote:
Edit: Fix textile. D’oh!
Err, is that textile that needs something fixing, or something you wrote in textile that needs fixing? If it is the first, let me know.
— Steve
Offline
Re: How can I remove line-break elements from txp:linklist?
It was me. Having br
elements on my mind, I marked up the code blocks with br..
instead of bc..
. Don’t mind me. ;)
Offline