Textpattern PHP Cross Reference Content Management Systems

Source: /textpattern/setup/forms/article.search_results.txp - 94 lines - 2952 bytes - Text - Print

   1  <!-- count how many results return -->
   2  <txp:article pgonly="1" />
   3  
   4  <txp:if_search_results>
   5  
   6      <!-- if search result count greater than 200 then display excessive results message, otherwise show search result count -->
   7      <txp:if_search_results max="200">
   8          <h3>
   9              <txp:search_result_count />
  10              <txp:text item="matching_search_request" />
  11              <q>
  12                  <txp:search_term />
  13              </q>
  14          </h3>
  15      <txp:else />
  16          <h3>
  17              <txp:text item="too_common_search_term" />
  18              <q>
  19                  <txp:search_term />
  20              </q>
  21          </h3>
  22      </txp:if_search_results>
  23  
  24  <!-- if no search results, then display no search results message -->
  25  <txp:else />
  26      <h3>
  27          <txp:text item="no_search_matches" />
  28      </h3>
  29  
  30  </txp:if_search_results>
  31  
  32  <!-- display resulting articles (10 per page; default setting) -->
  33  <txp:article class="article-list" wraptag="ul">
  34  
  35      <li class="article" itemscope itemtype="http://schema.org/Article">
  36          <h4 itemprop="name headline">
  37              <a href="<txp:permlink />" itemprop="url">
  38                  <txp:title />
  39              </a>
  40          </h4>
  41  
  42          <!-- if the article has an excerpt, display that, otherwise show highlighted keywords in context of article -->
  43          <txp:if_excerpt>
  44              <div itemprop="description">
  45                  <txp:excerpt />
  46              </div>
  47          <txp:else />
  48              <p>
  49                  <txp:search_result_excerpt />
  50              </p>
  51          </txp:if_excerpt>
  52  
  53          <p class="footnote">
  54              <txp:text item="posted" />
  55              <time datetime="<txp:posted format="iso8601" />" itemprop="datePublished">
  56                  <txp:posted />
  57              </time>
  58              <meta itemprop="dateModified" content="<txp:posted format="iso8601" />" />
  59              &#183;
  60              <txp:text item="author" />
  61              <span itemprop="author" itemscope itemtype="http://schema.org/Person">
  62                  <span itemprop="name">
  63                      <txp:author link="1" this_section="1" />
  64                  </span>
  65              </span>
  66          </p>
  67      </li>
  68  
  69  </txp:article>
  70  
  71  <!-- check if there are further results and provide pagination links or disabled buttons depending on the result,
  72       this method is more flexible than using simple txp:older/txp:newer tags -->
  73  <txp:if_search_results min="11">
  74  
  75      <txp:variable name="prev" value='<txp:older />' />
  76      <txp:variable name="next" value='<txp:newer />' />
  77  
  78      <p class="paginator">
  79          <txp:if_variable name="next" value="">
  80          <txp:else />
  81              <a rel="prev" href="<txp:newer />">
  82                  <txp:text item="prev" />
  83              </a>
  84          </txp:if_variable>
  85  
  86          <txp:if_variable name="prev" value="">
  87          <txp:else />
  88              <a rel="next" href="<txp:older />">
  89                  <txp:text item="next" />
  90              </a>
  91          </txp:if_variable>
  92      </p>
  93  
  94  </txp:if_search_results>

title

Description

title

Description

title

Description

title

title

Body