Re: Plone: Object-Reihenfolge im Ordner veränd ern
Gottfried Sascha <[email protected]>
| Newsgroups | gmane.comp.web.zope.german |
|---|---|
| Message-ID | <[email protected]> |
Hallo Jens, aus der Antwort von Andreas kannst du auch entnehmen, dass die Position der Objekte in einem Ordner in einem Index im portal_catalog (afaik: objPositionInParent) indiziert wird. Die Templates rufen diese Information ab, um die Reihenfolge in der Darstellung abzubilden. Daher musst du nach einer Änderung des Objektes, das Objekt neu indizieren lassen. Sascha IAS Institut fuer Arbeits- und Sozialhygiene Stiftung Steinhäuserstraße 19, D-76135 Karlsruhe Vorstand: Arndt Kempen, Dr. Peter Wrogemann Vorsitzender des Kuratoriums: Prof. Dr. Dr. Norbert Gross Sitz der Stiftung: Karlsruhe, USt-IdNr.: DE 143609069 Eingetragen ins Stiftungsverzeichnis des Regierungspräsidiums Karlsruhe Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Andreas Jung Gesendet: Donnerstag, 8. September 2011 14:51 An: Deutschsprachige Zope-Benutzer-Liste Betreff: [dzug-zope] Re: Plone: Object-Reihenfolge im Ordner verändern -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jens Nachtigall wrote: > Hallo, > > ich möchte via etwas wie myplone.org/folder/object/moveto?pos=3 das > "object" an die dritte Stelle im "folder" bewegen. Hier mein Skript, > leider funktioniert weder moveObjectToPosition noch > moveObjectsByDelta, d.h. es scheint rein gar nichts zu passieren. Wie > macht man das? > > request = container.REQUEST > > # test if the given parameter ist really given try: pos = > int(request.pos) except: print "problem with pos, is it a number" > return printed > > obj_id = context.getId() parent = context.aq_parent > #parent.moveObjectToPosition(obj_id, pos) > parent.moveObjectsByDelta(obj_id, pos) parent[obj_id].reindexObject() - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJOaLolAAoJEADcfz7u4AZjyfMLwNKQewF7e4j6YhH+LNy8E19l gSykFjCXhTGdgEZCkrhXH3B9/BQ99P0+OzkdouLJMHmN5cksjlyitIRvDqkw35Iu 9MdiCkF6m44ly+a6+U94y38qcrTEBsNcffmeJjPaebYhwfxsk7y1T2SCJ4Jc4B/m FADa+ULk9xXxvThDQsGZV/zuqaSKb05qWN6NLzDSIFwLpJDrXmKudtDngmry8ZyT oSiTyTv0r4EPlR/Tb15i7CChfYrp+yB26ibiQQB4x/oSBTjVRNg+TW9/VhvbSVIC s7mxJUIh04+SkEic05yJWao1Xd0QKjPpX8T4vkgLcgLJ81neycNhuPDcP6hUfccS vDvU82sexcmoMKnpZxj1LCWmr43IiejyFD4tZ0vimoMNBF/94I/yXuTlyFJ30etg fxqMeKkWuAahfWxKIWuWmHQiXGNgdzLktdmGEPJNb9wOeKhrP8fm+dTCA8CsCxka U2Q2QEn8tDr1vvYgMeQiBcNccWPHUig= =BZJw -----END PGP SIGNATURE----- _______________________________________________ zope mailing list [email protected] https://mail.dzug.org/mailman/listinfo/zope