Browse in just one level

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
HansV
Posts: 34
Joined: Fri 25. Mar 2005, 13:05
Location: Rotterdam, The Netherlands

Browse in just one level

Post by HansV »

I am looking for a way to use the {BROWSE:NEXT and {BROWSE:PREV tags to browse in just one level only. At this moment, the {BROWSE:NEXT just continues browsing, even if it is the last article in a category.

You can have a look at the current behaviour on my site: http://www.oetsikoetsi.nl/cms/index.php?id=4,10,0,0,1,0

Click the big buttons in the righthand corner, at the bottom of the screen (called 'Terug' and 'Volgende') to browse. You will notice that, when you're browsing back and forward a bit, it also shows the category as a page, with no graphics at all...

Of course, I know that it is possible to use the 0 and 1 indicators in the tag to stop the possibility of further browsing but I need these browsing tags to work from a template.

I know this has been talked about before, in this article: http://www.phpwcms.de/forum/viewtopic.p ... rowse+next

But the answer in that article is not sufficient for my needs. I need the tag to be dynamic, i.e. no hardcoding of article numbers needed. The reason is, that the website I am building will have content that will vary a lot overtime: categories will have between 1 and n articles, varying all the time.

Is it possible to have this behaviour of the {BROWSE tags?
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Hmm I'm using 1.2.9 nightly build and want to browse trough the article just in one category. Does anybody know a solution for doing this?
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

I have solved it with a cp before the first cp and behind the last cp.

If you want to rotate in this category there is a way for a "one direction rotation".

CP_first (forwarding: index.php?CP01)

CP01
CP02
CP03
CP04
CP......

CP_last (forwarding: index.php?CP_first)

An other solution is a hard coded CP_last to the last CP..... (forwarding: index.php?CP.....)
This rotate forward and backward. http://www.ne-paneeldecken.de/de_photoalbum_1.phtml


Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Ja stimmt - das wäre eine Möglichkeit, allerdings ein bißchen schwierig gerade wenn ein nicht HTML-fähiger Mensch pflegen will... (-> Kunde)
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Wenn der erste CP01 fix ist, braucht er nur immer vor dem CP_last einzufügen. Also zwischen dem ersten CP01 und CP_last könnte er machen was er möchte.
Das Scrollen geht natürlich nur in eine Richtung.

Allerdings sollte O.G. diese Funktion überarbeiten, denn das automatische Herausspringen aus dem Level ist nicht so toll (vermutlich war es auch nicht so gedacht).

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Ja da gebe ich dir recht. Ich hätte gerne eine Art Endlosschleife für das Browsen durch die Artikel einer Ebene
Mein Problem wird hier recht schnell deutlich: http://heilenz.kcomp.net/index.php?id=15,17,0,0,1,0
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Funktioniert doch, wenn du den CP_last mit der Weiterleitung auf die Übersicht einbaust. Denn der Rücksprung in dei Übersicht (erster CP BROWSE:PREV) ist doch o.k. Damit könnte ich leben.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Ja nur ich will auch den Rücksprung nicht ... aber ich weiß wie ich die Sache lösen kann.
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Und wie :?: :shock:
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Im Prinzip so wie du gesagt hast:
der erste Artikel und der letzte bekommen jeweils ein eigenes Template. Damit ist natürlich keine Schleife möglich aber es funktioniert zumindest mal.
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Also stoppst du BROWSE:NEXT/PREV:0 ?
Hier http://www.art-varij.de/72.0.0.1.0.0.phtml habe ich es so gemacht, dass auf jeder Seite unten ein CP mit Last <-> Next über einen Alias hinzugenommen wird. Es existieren also drei CPs
1. << last << (deaktiviert) >> next >> (aktiv)
2. << last << (aktiv) >> next >> (aktiv)
3. << last >> (aktiv) >> next >> (deaktiviert)
Und in einem Custom Block verpackt, damit der Ort immer passt. Vor allem hat der Custom Block den Vorteil, dass der User selten auf die Idee kommt hier etwas hineinzuschreiben.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
nekket
Posts: 613
Joined: Tue 18. Nov 2003, 15:46
Location: Baden-Baden
Contact:

Post by nekket »

Hier existieren jetzt drei Artikel-Templates... funktioniert genauso :)
pixelpublic GmbH | Agentur für Neue Medien und Gestaltung
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Yep, wollte einfach den Templatewust vermeiden.

Ich finde die Funktion auf deiner Seite nun o.k. Es ist klar ersichtlich, das jeweils das Ende erreicht ist.
Für die allermeisten User ist das sogar die bessere Lösung, da ein Rotieren häufig verwirrt und User die Orientierung verliert.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post by Peekay »

Don't understand a word of German! :wink: but I am interested in limiting the 'browse previous' and 'browse next' to articles in one category. The way I did it is to create two categories, one either side of the one I want to browse. Both are hidden from main menu and have a single article with a redirect.

Redirect to news (hidden cat) Redirect (article) Redirect to: index.php?news.
News (cat)
Redirect to news (hidden cat) Redirect (article) Redirect to: index.php?id=3,4,0,0,1,0 (the first, or last news article).

This seems to work.
Post Reply