[TYPO3] tt_news templates

Lamb, Brian blamb at jcvi.org
Wed Apr 30 21:08:55 CEST 2008


A hacky solution to showing the text of the search is the following: 

<p class="bodytext" id="swords###SWORDS###">Showing results for
"###SWORDS###"</p>

With the following CSS:

#swords { display: none; }

How about a solution to showing the number of entries? 

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Lamb,
Brian
Sent: Wednesday, April 30, 2008 2:38 PM
To: TYPO3 English
Subject: [TYPO3] tt_news templates

Hello all, 

 

I looked over the archives but can't seem to find exactly what I am
looking for. I have set up a tt_news search on a certain page. I have
set it up so that by default, it displays all items. Upon a search
however, I would like to display a message such as 'Showing results for
"my search"'. If possible, I would also like to show the total number of
matches found on that search. I currently have the following: 

 

<!-- ###TEMPLATE_SEARCH### begin

  Subpart for the search-form

-->

  <div class="news-search-form">

    <form method="post" action="###FORM_URL###">

      <input size="30" maxlength="100" type="text"
name="tx_ttnews[swords]" value="###SWORDS###" />

      <span class="news-search-form-submit"><input type="submit"
name="search" value="###SEARCH_BUTTON###" /></span>

    </form>

    <p class="bodytext">Showing results for "###SWORDS###"</p>

  </div>

<!-- ###TEMPLATE_SEARCH### end -->

 

Which will correctly show the text after a search but also shows
'Showing results for ""'. Is there a way to do some sort of conditional
in the template or possibly with TypoScript? Additionally, is there a
flag for the number of results the search finds? 

_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list