Accordion Navigation -> Aufgeklappt lassen bei Seitenwechsel

Bitte alle templatebezogenen Beiträge in diesem Forum veröffentlichen.
Post Reply
User avatar
santscho
Posts: 1442
Joined: Mon 2. Apr 2007, 08:56
Location: Schweiz

Accordion Navigation -> Aufgeklappt lassen bei Seitenwechsel

Post by santscho »

Eine Accordion-Navigation war immer ein Problem im phpwcms, da nach einem Seitenwechsel alle Panels immer wieder geschlossen wurden. Nicht gerade Benutzerfreundlich.
Das kann verhindert werden, indem fuer den aktuellen Status ein Cookie gesetzt wird. jquery-cookie.js schafft Abhilfe...

http://www.mikecentola.com/blog/2009/05 ... dion-menu/
Schon Konfuzius sagte: "Sei kein YAML-Lappen". YAML-phpwcms-Integration auf http://www.yaml.phpwcms.org
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by Oliver Georgi »

naja, das ist aber eher kein phpwcms Problem, sondern eben grundsätzlicher Art, da Accordion nun mal nur mit JavaScript funktioniert.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
santscho
Posts: 1442
Joined: Mon 2. Apr 2007, 08:56
Location: Schweiz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by santscho »

Schon klar. Hab's vermutlich bisschen falsch formuliert. Natuerlich kann man diesbezueglich phpwcms nicht den schwarzen Peter zuschieben.
Schon Konfuzius sagte: "Sei kein YAML-Lappen". YAML-phpwcms-Integration auf http://www.yaml.phpwcms.org
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by update »

Für Mootools gibt's das natürlich entsprechend auch, klar ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by update »

It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Uwe367
Posts: 1207
Joined: Sat 15. Sep 2007, 07:19
Location: Koblenz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by Uwe367 »

Hat das schonmal jemand mit jquery umgesetzt? Leider scheiterts an meinem doch mittlerweile sehr bescheidenen Englisch :(
User avatar
santscho
Posts: 1442
Joined: Mon 2. Apr 2007, 08:56
Location: Schweiz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by santscho »

Hallo Uwe. Hast Du die Cookie-Loesung schon ausprobiert?
Schon Konfuzius sagte: "Sei kein YAML-Lappen". YAML-phpwcms-Integration auf http://www.yaml.phpwcms.org
User avatar
Uwe367
Posts: 1207
Joined: Sat 15. Sep 2007, 07:19
Location: Koblenz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by Uwe367 »

santscho wrote:Hallo Uwe. Hast Du die Cookie-Loesung schon ausprobiert?
Ich habs zumindest versucht, aber leider ohne Erfolg. Wie ich schon schrieb, wirds wohl an meinen sehr bescheidenen Englischkentnissen liegen. Ich probier einfach weiter.. irgendwann wirds wohl klappen :)
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by update »

Hier ist eine Lösung für jquery:
http://stackoverflow.com/questions/1123 ... er-refresh

Code: Select all

jQuery(document).ready(function(){
    $( "#accordion" ).accordion({
        change: function(event, ui) {
            //set cookie for current index on change event
            $.cookie('saved_index', null);
            $.cookie('saved_index', $( "#accordion" )
                    .accordion( "option", "active" ));
        },
        active:parseInt($.cookie('saved_index'))
    });
});
sollte mit einer Anpassung von
("#accordion").accordion
funktionieren, oder?

Und hier noch eine andere Lösung:
http://christopherdubeau.com/jquery-acc ... -w-cookie/

Für mootools kann ich Dir eine Lösung geben....
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Uwe367
Posts: 1207
Joined: Sat 15. Sep 2007, 07:19
Location: Koblenz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by Uwe367 »

Mercie... Werd mich die Tage ransetzen und wenns nen Erfolg zu vermelden gibt wird mans hier lesen können :D
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by update »

Aber das ist im Prinzip das Gleiche wie auf der Seite des von santcho geposteten Links....
Probier's auch noch mal damit!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Uwe367
Posts: 1207
Joined: Sat 15. Sep 2007, 07:19
Location: Koblenz

Re: Accordion Navigation -> Aufgeklappt lassen bei Seitenwec

Post by Uwe367 »

Auf meinem Localhost läuft das ganze schonmal bestens und wenn alles klappt wirds in den nächsten 2 Tagen online zu sehen sein. Ich habe mich an diesem Beispiel orientiert:
https://www.truenegative.com/
Jetzt fehlt nur noch ein passender RT wobei ich überlege ob dieser von Knut http://www.phpwcms-howto.de/wiki/doku.p ... av_vert_fo in abgewandelter Form als Vorlage dafür gut wäre.
Was meint ihr? :wink:

[EDIT]
Ich gebs auf nen RT dafür zu bauen.... :(
Post Reply