Item1729: Have more flexibility in Twisty's remember setting

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.7
Target Release: patch
Applies To: Extension
Component: TwistyPlugin
Branches:
Reported By: ArthurClemens
Waiting For:
Last Change By: KennethLavrsen
This use case came up in Item881:
  1. Multiple attachment tables can be on one page, so the attachment twisty cannot have a fixed id
  2. The state of having the attachment twisty opened or closed should be set site-wide, not per topic

The current implementation is as follows:
  1. If for TWISTY the param id is set, that id is used
  2. If no id is set, a generic id is created, based on web, topic and twisty order
  3. If for TWISTY the param remember is set to on, the twisty state is stored in a cookie, with the preference name based on the id

We need a creative solution to let this all work together.

-- ArthurClemens - 15 Jun 2009

I am pondering to append a sequential number to the id. That would make the id unique. Possibly only works for TWISTY, not for TWISTYBUTTON and TWISTYTOGGLE, because these may be located elsewhere on the page.

-- ArthurClemens - 01 Sep 2009

That did the trick. It works automatically for TWISTY; for TWISTYBUTTON and TWISTYTOGGLE you still need to create your own unique id.

-- ArthurClemens - 02 Sep 2009

ItemTemplate edit

Summary Have more flexibility in Twisty's remember setting
ReportedBy ArthurClemens
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:b5d0a7f860d6 distro:0ca58480d8fa
TargetRelease patch
ReleasedIn 1.0.7
Topic revision: r8 - 20 Sep 2009, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy