Erich Boyer

Select entries with a title that start with a given letter

Vote 0 Votes

Hi Kids, I'm a little new to Movable Type and I've tried to searching the forums with no luck.
All I want to do is select entries with a field that start with a given letter, for example B or b.
How do I do this?
Thanks,
Erich

Reported on Movable Type 4.3

2 Replies

| Add a Reply
  • Hi Erich.

    I don't think that you can do it directly, but maybe something like that will work:

    <mt:entries>
    <mt:if tag="EntryTitle" like="^(B|b)">
    </mt:if>
    </mt:entries>

    the "^(B|b)" is a regular expression that says "starts with B or b".

    Shmuel.

  • Hi Shmuel,

    I've enjoyed your reply to Erich here!

    It would be really excellent if you could put together a page on the movable type documentation which to detail a few samples of regular expressions usage in combination with movable type tags, such as the mt:If tag.

    We definitely lack this piece of information at this time.

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/

Add a Reply

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

Forum Groups

code.sixapart.com

139 494

Last Topic: Action Stream for Reddit not working by jack lail on Nov 27, 2012

240 822

Last Topic: Frontend uploading? by mosquito on Nov 7, 2012

88 306

Last Topic: absolute publish date in Manage Entries screen by .mau. on Apr 18, 2012

1503 5392

Last Topic: Error changing Website Root Path by Neil Bellingham on Dec 12, 2012

744 3132

Last Topic: Missing UI Elements (toolbar and categories) by Aaron Macks on Dec 3, 2012

89 317

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

188 788

Last Topic: Problems migrating blog to cloud service by tkrepcio on Dec 6, 2012

27 96

Last Topic: Upgrading MT by Caio on Oct 15, 2012

49 221

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 245

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012