[TYPO3] tt_news page browser for LIST

Erik Svendsen erik at linnearad.no
Wed Apr 16 14:12:05 CEST 2008


Hello Stephen,

You don't have any marker to place/render your pagebrowser in the list_template. 
Look at the template in the extension folder, and you will find it. If you 
miss a necessary marker, the content of that marker never shows.

WBR,
Erik Svendsen
www.linnearad.no


> Hi all.
> 
> How do I get the tt_news plugin to show a page browser in List view?
> 
> Here is my TypoScript:
> 
> plugin.tt_news {
> 
> # Change some strings to suit the site design
> _LOCAL_LANG.default.preAuthor =
> _LOCAL_LANG.default.more = Read more
> _LOCAL_LANG.default.backToList = Back to %s
> _LOCAL_LANG.default.noResultsMsg = No matching articles found.
> _LOCAL_LANG.default.searchEmptyMsg = Please enter a search word.
> _LOCAL_LANG.default.noNewsIdMsg = <b>Can't display article</b><br
> />No
> Article ID could be found.
> _LOCAL_LANG.default.pi_list_browseresults_prev = Previous
> _LOCAL_LANG.default.pi_list_browseresults_page = Page
> _LOCAL_LANG.default.pi_list_browseresults_next = Next
> _LOCAL_LANG.default.pi_list_browseresults_first = First
> _LOCAL_LANG.default.pi_list_browseresults_last = Last
> _LOCAL_LANG.default.pi_list_browseresults_displays = Displaying
> results
> ###SPAN_BEGIN###%s to %s&lt;/span&gt; out of
> ###SPAN_BEGIN###%s&lt;/span&gt;
> _LOCAL_LANG.default.pi_list_browseresults_displays_advanced =
> Displaying
> results ###FROM### to ###TO### out of ###OUT_OF###
> _LOCAL_LANG.default.pi_list_browseresults_to = to
> # Template file
> templateFile =
> fileadmin/templates/fmf/extension_templates/tt_news_v2_template.html
> displaySingle {
> 
> # Remove the P tag wrapped around the authors name
> author_stdWrap.wrap >
> # Stop Authors name being turned to upper case
> author_stdWrap.case >
> date_stdWrap.strftime = %d %B %Y
> #time_stdWrap.strftime = %H:%S
> imageCount = 1
> }
> displayLatest {
> 
> # Add an obfuscated mailto: link to authors name
> author_stdWrap.typolink.parameter.field = author_email
> date_stdWrap.strftime = %d %B %Y
> time_stdWrap.strftime = %H:%S
> }
> displayList {
> 
> # Add an obfuscated mailto: link to authors name
> author_stdWrap.typolink.parameter.field = author_email
> date_stdWrap.strftime = %d %B %Y
> time_stdWrap.strftime = %H:%S
> #content_stdWrap.postUserFunc = tx_pmkhtmlcrop->htmlCrop
> #content_stdWrap.postUserFunc.htmlCrop = 300 | ... | 1
> content_stdWrap.stripHtml = 1
> content_stdWrap.crop = 300 | ... | 1
> image.params = style="float:left; margin-right:20px;
> margin-top:20px
> margin-bottom:0px"
> }
> #allowCaching = 0
> searchPid = 20
> limit = 10
> noPageBrowser = 0
> useMultiPageSingleView = 1
> pageBreakToken = <---newpage--->
> pageBrowser.dontLinkActivePage = 1
> excludeAlreadyDisplayedNews = 1
> #newsFiles_stdWrap.wrap =
> #newsFilesHeader_stdWrap.wrap =
> #newsFiles.stdWrap.wrap =
> }
> I don't have a pagebrowser in LIST view, only in the SINGLE view.
> 
> But on page 151 I need a page browser:
> 
> So I added this code:
> 
> [globalVar = TSFE:id = 151]
> plugin.tt_news.limit = 5
> plugin.tt_news.pageBrowser.dontLinkActivePage = 1
> plugin.tt_news.pageBrowser.maxPages = 10
> [global]
> The limit is less than the number of test articles I have, so that I
> can see the page browser. I assumed that if the number of articles was
> less than the limit you would see no page browser.
> 
> I don't see any page browser.
> 
> Here is my Template fort he list on page 151:
> 
> <!-- ###TEMPLATE_LIST### begin
> This is the template for the list of news in the archive or news
> page or search
> -->
> 
> <!-- ###CONTENT### begin
> This is the part of the template substituted with the list
> of news:
> -->
> <!-- ###NEWS### begin
> Template for a single item
> -->
> <div id="archiveArticle">
> <h1
> id="archiveList"><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITE
> M###--
>> </h1> <span id="archiveDate">###NEWS_DATE###</span>
>> 
> <div class="archiveSpacer" id="spacer"></div>
> </div><!-- /archiveArticle -->
> <!-- ###NEWS### end-->
> <!-- ###CONTENT###  end -->
> <!-- ###TEMPLATE_LIST### end -->
> 
> Why don't I ever see the page browser?
> 




More information about the TYPO3-english mailing list