o6asan

How can I display more than 20 posts by mt-search.cgi?

Vote 0 Votes

I use MTOS5.1.

I wanted to display more than 20 posts, so, tried the below.
http://example.com/mt-search.cgi?search="key words"&IncludeBlogs=1&limit=40&SearchResultDisplay=ascend

But MT displayed only 20 posts again. There are 21 matching posts exactly.
How can I realize what I want?

Thanks.

Reported on Movable Type 5

4 Replies

| Add a Reply
  • Please try to write this line in your mt-config.cgi file.

    SearchMaxResults 40

  • Thanks, Nick.

    I made it. But I have a problem.
    Not only I use "http://example.com/~ascend" but also MT shows more than 20 post at other section. For example, Side bar's search box, feed, etc.

    I want to make it, when only using "http://example.com/~ascend". Is it possible?

    Thanks in advance.

  • Though I'm not sure your situation, are you using mt-search.cgi logic not only for search results, but also for sidebar and other parts?

    How about limiting the parts as you wrote,

    http://example.com/mt-search.cgi?search="key words"&IncludeBlogs=1&limit=20&SearchResultDisplay=ascend

    40 => 20 where you want to limit results?

  • Hi, Nick,
    Thanks, again. I finally made it.

    What I wanted is this.
    When I use "http://example.com/~ascend" as an external link, I want to display more than 20 posts by mt-search.cgi.

    First, I changed 20 into 40 of the link. But I couldn't have my expecting result because MT's default "SearchMaxResults" set value was very strong.
    Next, by your suggestion, I wrote "SearchMaxResults 40" in my mt-config.cgi file. But this reflected other parts, so I was in trouble.

    Today, I searched for the tag <$mt:SearchMaxResults$> in my template files. I found them in two places and rewrote <$mt:SearchMaxResults$> => 20.

Add a Reply

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

Forum Groups

1774 6167

Last Topic: Template modules by Zielun on Feb 16, 2012

86 302

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

1434 5088

Last Topic: Maintenance announcement by Nick on Feb 17, 2012

695 2912

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

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

174 740

Last Topic: Captcha images rendering slowly by ScottM on Feb 12, 2012

190 568

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

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012