Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-04-19 15:40:12
- inkywillow
- Member
- From: France
- Registered: 2009-12-22
- Posts: 37
How to remove whitespace in section_list output
Hi all, I would like to remove the whitespace that is generated between each li in a list generated by section_list. Anybody know how to do this?
Cheers…
Tom
The Design Works – Freelance website designer
Offline
Re: How to remove whitespace in section_list output
Hi, Tom! Depending on your purpose and the specific patterns you want to remove, you could use pax_grep to do something like this:
<txp:pax_grep from="'\t|\r|\n'" to=""><txp:section_list br="li" wraptag="ul"/></txp:pax_grep>
You could also use rah_function or even pat_speeder, depending on your exact needs.
Last edited by johnstephens (2011-04-19 16:02:26)
Offline
Re: How to remove whitespace in section_list output
Hi Tom
aks_header strips white space but also does much more… Probably not what you are looking for…
Edit: John’s post is more relevant. Also google check
Last edited by colak (2011-04-19 16:05:23)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How to remove whitespace in section_list output
colak wrote:
aks_header strips white space but also does much more…
Aha! I knew I was forgetting something.
Offline
#5 2011-04-19 20:33:20
- inkywillow
- Member
- From: France
- Registered: 2009-12-22
- Posts: 37
Re: How to remove whitespace in section_list output
Thanks guys. Pax_grep looks promising but the download link doesn’t seem to be working?
The Design Works – Freelance website designer
Offline
Re: How to remove whitespace in section_list output
Oops! I’ll fix it after I feed my baby.
Offline
Re: How to remove whitespace in section_list output
There! I apologize for the mishap.
Offline
#8 2011-04-20 08:31:51
- inkywillow
- Member
- From: France
- Registered: 2009-12-22
- Posts: 37
Re: How to remove whitespace in section_list output
No problem. Thank you, I’ll give it a go today when I’ve finished feeding my three! :D
The Design Works – Freelance website designer
Offline
#9 2011-04-20 12:49:51
- inkywillow
- Member
- From: France
- Registered: 2009-12-22
- Posts: 37
Re: How to remove whitespace in section_list output
Works like a charm John. Many thanks.
The Design Works – Freelance website designer
Offline
Re: How to remove whitespace in section_list output
You’re very welcome, Tom! I use the same code whenever I need to output a bunch of variables.
Offline