Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-04-14 06:20:01

zeraph
New Member
Registered: 2014-04-02
Posts: 9

Formatting an array from a custom field

This is a question that is probably quite simple but searching hasn’t turned up anything so far.

I’m using glz_custom_fields, and one of my fields takes multiple values. When I output that custom field with the native textpattern tag, I get a vertical line between each value ( “|” ) with no space on either side. Where can I control this, substituting another character or characters for the vertical line?

Thanks in advance.

Offline

#2 2014-04-14 07:49:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Formatting an array from a custom field

zeraph wrote #280223:

substituting another character or characters for the vertical line?

You could try the rah_replace plugin if you want to just replace the characters, or rah_repeat if you want to iterate over the items.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2014-04-14 15:12:16

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Formatting an array from a custom field

or the excellent smd_each

Offline

#4 2014-04-15 08:12:13

zeraph
New Member
Registered: 2014-04-02
Posts: 9

Re: Formatting an array from a custom field

Thanks a bunch!

Offline

Board footer

Powered by FluxBB