user-pic

split modifier for template tags?

Vote 0 Votes

Greetings,

We all love 'split', so is there a way to split a template tag?

I've got a custom field called "relatedstories" defined via Preferences that takes a list of entries as input. Currently, it's just a text field and users have to do the HTML with <P>: and <:BR> tags to output them in list form, and I don't get to do anything with them. What I'd much rather do would be for users to enter a CSV or \n-delimited list and process it myself, like so

<mt:relatedstories split=",">
/* do some stuff with a related story*/
</mt:relatedstories>

Unfortunately, I don't see split or anything similar as a tag modifier anywhere in the list, and I'd really like to not have to write a module if there's a way around it. I could also add unique custom fields for each story, since there is a limit of 3, but that's kinda ugly, too. Is anybody else doing something like this, and how are you handling it?

thanks,
Bill

Reported on Movable Type 4.3

2 Replies

| Add a Reply

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1771 6153

Last Topic: Preview Template - Where can I find it? by Dice on Feb 6, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1428 5076

Last Topic: Stupid Question? How to make a static homepage by Jeremy on Feb 3, 2012

693 2907

Last Topic: database upgrade hangs - upgrading to 4.37 by CrankyProfessor on Feb 1, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

221 710

Last Topic: Publish queue cache coherence issue by Istvan Kallai on Jan 27, 2012