Discussion:
[TYPO3-english] News system (ext: news) previous-next pagination for detailed view
Victor Livakovsky
2011-12-22 23:52:18 UTC
Permalink
Hi, List.

I've started using a new 'news' extension to see all it's features,
comparing to old (but not bad ;) ) 'tt_news'. And one thing, I'm missing
here is previous-next navigation in detailed view. Can it be done with
existing 'paginate' widget or it's completely new feature?
I've tried to make it with paginator widget, but my extbase/fluid knowledges
are limited, so I was not able to do it.

Thank you in advance.
Georg Ringer
2011-12-23 06:55:26 UTC
Permalink
Hi Victor,

I have thought about this feature and IMO is this feature not doable for
100%.

Let me explain that a bit further: The detail view got only 1 single
information via GET parameter and this is the ID of the news record,
nothing else. To achieve the pagination, it would need *all* other
information which are saved in the list view only (startingpoint, which
archive mode, ...) but also information which can be dynamic in the list
view too, like grouping by category. Only after having all of this
information available, it would be possible to make a pagination.

More problems: 2 (or more) totally different configured list views can
use the *same* detail view. so it will get even harder.

I doubt that all this is considered in tt_news.

Georg
Jigal van Hemert
2011-12-23 07:47:39 UTC
Permalink
Hi,
Post by Georg Ringer
I have thought about this feature and IMO is this feature not doable for
100%.
I once had to do this, based on tt_news. Fortunately we had to make the
list views ourselves because they needed to have facets for selections
and sorting, and the expectation was that the next/previous link would
take these into consideration.

For practical reasons I used a somewhat odd solution: the list view
stored a list of record uids (max. 500 in this case) in the TYPO3
session data together with the page id. This page id was also
transferred to the single view.
The next/prev links could easily use this list of records uids to navigate.

This is not the ultimate solution, but a compromise between storage
requirements (list of uids in session data), speed (precalculated list
of records) and flexibility (no knowledge about how the list was made in
the prev/next part).
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Georg Ringer
2011-12-23 08:18:11 UTC
Permalink
Post by Jigal van Hemert
For practical reasons I used a somewhat odd solution: the list view
stored a list of record uids (max. 500 in this case) in the TYPO3
session data together with the page id. This page id was also
transferred to the single view.
and what if a user gets to the single view by google or a bookmark? no
session available.

no way to go for me

georg
Jigal van Hemert
2011-12-23 09:03:29 UTC
Permalink
Hi Georg,
Post by Georg Ringer
Post by Jigal van Hemert
For practical reasons I used a somewhat odd solution: the list view
stored a list of record uids (max. 500 in this case) in the TYPO3
session data together with the page id. This page id was also
transferred to the single view.
and what if a user gets to the single view by google or a bookmark? no
session available.
You solved that part of the next/prev problem already in one of your
extensions for tt_news.

If there is no session data available then you obviously didn't visit
the page coming from a list view. So there is no context of any
selection, ordering, etc. You could retrieve your own list of records
based on TS settings or just have no prev/next.
Post by Georg Ringer
no way to go for me
It almost sounds as you don't want anything like prev/next links. If
that is the case then just say so... You're clever enough to solve this
if you really wanted it.
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Georg Ringer
2011-12-23 09:10:07 UTC
Permalink
Post by Jigal van Hemert
You solved that part of the next/prev problem already in one of your
extensions for tt_news.
I tried to but all settings of list view need to be done again in the
detail view plugin which is not possible in ext:news as i hide those
settings because of usability reasons.

furthermore, as said already, this works only then for 1 kind of list view.
Post by Jigal van Hemert
If there is no session data available then you obviously didn't visit
the page coming from a list view. So there is no context of any
selection, ordering, etc. You could retrieve your own list of records
based on TS settings or just have no prev/next.
and this retrieval based on custom ts settings is the one which is not
really possible, see reasons in previous posting.
Post by Jigal van Hemert
It almost sounds as you don't want anything like prev/next links. If
that is the case then just say so... You're clever enough to solve this
if you really wanted it.
trust me: this is certainly a nice feature but as told twice, I got no
idea how to solve it when there is no session available, maybe even a
static variant of the website because a single news record knows nothing
about its prev/next record.

but to be honest: i don't think this is the most needed feature,
therefore I concentrate on others

Georg
Victor Livakovsky
2011-12-23 12:12:03 UTC
Permalink
Hi, Jigal.
For practical reasons I used a somewhat odd solution: the list view stored
a list of record uids (max. 500 in this case) in the TYPO3 session data
together with the page id. This page id was also transferred to the single
view.
The next/prev links could easily use this list of records uids to navigate.
Developer's thoughts are mostly same :)
I've once developed an extension (not based on tt_news, but custom one),
which also had list and single view, and it was required to have prev-next
navigation in single view. Moreover, on of list views was search result. And
there were more, than one list on a page. So, I also solved this by storing
list of uids in a session, but they were bound not to page id (since, we
could have more, than one list on a page), but to uid of content element,
which renders a list.

But, yes, this solution had the same problem - if session expires, no more
prev-next navigation for a single view. And one additional problem: if
plugin was inserted via TS (not like normal CE), then it was not possible to
get the uid of CE to bound the uid list, so also no previous-next
navigations for a single view of such lists. But it has an advantage as
well: since you have uid of list CE in your single view, you can get all the
settings of that CE, if needed.

So, talking about the subject, such a solution may be a temporary, since it
will not work in all the cases, but it is quite quick.
Oliver Salzburg
2011-12-24 17:23:41 UTC
Permalink
Post by Georg Ringer
I doubt that all this is considered in tt_news.
So do I. That part of tt_news is horribly broken.
This is just one thing that comes to mind:
http://bugs.typo3.org/view.php?id=17919

Loading...