[ic] possible bug in [item-alternate] ic5.2

Olaf Kolling kolling at w3welt.de
Mon Nov 8 17:28:00 EST 2004


Hello,

i think i found a bug in the [item-alternate]-tag of ic 5.2
It would be great if someone could confirm and maybe even fix this...

Here's the code i use (only the relevant part)
------------------------------------------------
[search-list]
[item-alternate first_only]alternate first<BR>[/item-alternate]
[item-alternate 3]alternate 3<BR>[/item-alternate]
[item-alternate last_only]alternate last<BR>[/item-alternate]
[/search-list]
[more-list]
[first-anchor][/first-anchor]
[next-anchor]vor[/next-anchor]
[prev-anchor]zurück[/prev-anchor]
[last-anchor][/last-anchor]
Treffer [matches] von insgesamt [match-count]<BR>[more]
[/more-list]
------------------------------------------------

The code is on a searchresults-page wich was called with matchlimit 6.
In the real-page it should build a table with 3 columns and 2 rows.

Here's the output of the above code on three subsequent pages
The search returned 13 hits in total, so there are 2 pages with 6 items 
and one last page with just one item.

First result-page:
------------------------------------------------
alternate first
alternate 3
alternate 3
alternate last
Treffer 1-6 von insgesamt 13
1 2 3 vor       
------------------------------------------------


Second result-page:
------------------------------------------------
alternate 3
alternate 3
alternate last
Treffer 7-12 von insgesamt 13
zurück 1 2 3 vor
------------------------------------------------


Third and last result-page:
------------------------------------------------
alternate last
Treffer 13-13 von insgesamt 13
zurück 1 2 3
------------------------------------------------

The problem is the inconsistent behavior of 
[item-alternate first_only] and [item-alternate last_only].

As you can see the [item-alternate first_only]-part is output only on the very first result 
(as it's name suggests) but the [item-alternate last_only] shows up with the last result on
each page (which is wrong but the behavior i need ;-)

So someone should fix the behavior of the current tags to be consistent with the naming and
docs and additionally write two new tags:

first_only --> just on the first result of all (ok right now)
last_only  --> only on the last result of all (fix neccessary)

And then two new tag (just a naming-suggestion ;-):
firstgroup_only --> on the first hit on each results-page (new todo)
lastgroup_only --> on the last hit of each results-page (behaviour of the current last_only)


Yours Olaf

--

********************************************************************
                       W³Welt Web-Entwicklung
--------------------------------------------------------------------
Olaf Kolling                            eMail: kolling-at-w3welt.de
Mörikestraße 67                 Tel.: +49 711 96666-200
70199 Stuttgart                           Fax: +49 711 96666-201
********************************************************************



More information about the interchange-users mailing list