Search results do not show pages (anymore?)

Search results do not show pages (anymore?)

Postby Mischa on Wed Nov 20, 2013 4:34 pm

Searching a blog for a common word in admin interface gives e.g. 10 pages of 5 results each, a total of 50 articles.
Searching in the frontend, the same search only gives 5 results, and no pagination which lets the visitor go to the other 9 pages of search results.

I am assuming that this pagination below the such results were visible before, because one of my bloggers pointed it out to me today.

What to do, I am at a loss at even beginning to figure out where to go...

(using lifetype-1.2.12_r7211)

Here is the searchresults.template code - same as the standard template:
Code: Select all
{assign var="OnSearchPage" value=1}
{include file="$blogtemplate/header.template"}
<div id="loop_articles">
   <h2>{$locale->tr("search_results")}: {foreach from=$searchterms item=term}{$term} {/foreach}</h2>
   <div id="SearchResults">
    {foreach from=$searchresults item=result}
      {assign var=article value=$result->getArticle()}
      <h3><a href="{$url->postPermalink($article)}">{$article->getTopic()}</a></h3>
      <p class="searchArticle">
      {$article->getText()|strip_tags|truncate:300:"...":false}
      </p>
      <p class="footer">
      {foreach name=categories from=$article->getCategories()
             item=postCategory}
          <a href="{$url->categoryLink($postCategory)}">
          {$postCategory->getName()}</a>{if
            !$smarty.foreach.categories.last}, {/if}
        {/foreach}
      </p>
    {/foreach}
   </div>
</div>
{include file="$blogtemplate/panel.template"}
{include file="$blogtemplate/footer.template"}
Using lifetype-1.2.12 pretty standard config
Mischa
 
Posts: 39
Joined: Fri Jun 20, 2008 9:27 am
Location: Åland Islands
LifeType Version: 1.2.12

Re: Search results do not show pages (anymore?)

Postby jondaley on Sat Nov 23, 2013 10:58 am

You probably want a:

Code: Select all
  <div class="pager">
   {pager style="links"}
  </div>


in the template somewhere.

The standard template has the pager code in the footer, so it would be included on all pages, I guess.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Search results do not show pages (anymore?)

Postby Mischa on Sun Nov 24, 2013 3:04 pm

*Blushing*
(I didn't look in the standard footer.template, only searchresults.template, and for some reason I took the pager away from footer a while back)
All is well, bless you for all your help!
Using lifetype-1.2.12 pretty standard config
Mischa
 
Posts: 39
Joined: Fri Jun 20, 2008 9:27 am
Location: Åland Islands
LifeType Version: 1.2.12


Return to Other Problems

cron