[TYPO3-english] tt_products prev/next weird behaviour

Iztok Kham pajek at pajcevina.net
Mon Nov 30 16:33:26 CET 2009


I have a tree of pages that display items from tt_products categories.
The tree looks like this:

     Category 1
         Subcategory 1.1
             Single view
         Subcategory 1.2
             Single view
     Category 2
         Subcategory 2.1
             Single view
         Subcategory 2.2
             Single view

On pages Catalogue, Category 1, Category 2 there is some normal 
contents, but on subcategory pages (Subcategory 1.1, Subcategory 1.2, 
Subcategory 2.1, Subcategory 2.2, etc.) I have a LIST view of 
corresponding tt_products category.
"Single view" pages only hold some TS for menus and also for single item 
display. Here's my TS on "Single view" pages:


# insert current item into corresponding TV container
plugin.tt_products.code = SINGLE
lib.productView < plugin.tt_products

# insert list of items in subcategory into corresponding TV container
plugin.tt_products.code = LISTARTICLES
lib.productList < plugin.tt_products


On every Subcategory x.y page I have this TS:


plugin.tt_products.defaultCategoryID = <cID>
plugin.tt_products.PIDitemDisplay = <pID>


<cID> - a corresponding tt_products category ID
<pID> - a corresponding "Single view" page ID

Now, everything works as expected ... when item in list on "Subcategory 
page" is clicked it displays properly and list of other items in 
subcategory displays correctly (only items in this tt_products category.

The only thing, that bothers me is when I use 
<!--###LINK_PREV_SINGLE###--> and <!--###LINK_NEXT_SINGLE###-->

all items get displayed (also display order is different than in 

Correct prev/next display would be:

        Item 1 (Subcategory 1.1) <next>
<prev> Item 2 (Subcategory 1.1) <next>
<prev> Item 3 (Subcategory 1.1) <next>
<prev> Item 4 (Subcategory 1.1) <next>
<prev> ... <next>
<prev> Last item from Subcategory 1.1

But what I get is:

<prev> Item 1 (Subcategory 1.1) <next>
<prev> Item 2 (Subcategory 1.1) <next>
<prev> Item 17 (Subcategory 2.1) <next>
<prev> Item 8 (Subcategory 1.2) <next>
<prev> ... <next>
<prev> item from whatever category

It seems like item order is random (or it may be in alphabetical order).

What am I doing wrong?
Please help me ... :-(

--- Iztok

More information about the TYPO3-english mailing list