cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item13896 (08 Feb 2016, GeorgeClark)Edit Attach

Item13896: TWISTY incorrectly used in Sandbox.WebHome, generates broken HTML.

pencil
Priority: Urgent
Current State: Closed
Released In: 2.1.0
Target Release: minor
Applies To: Engine
Component: TwistyPlugin
Branches: master Release02x00 Item13897
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Marked urgent, as our default Sandbox is generating broken HTML. But not sure if this should be a bug in TwistyPlugin & Sandbox, or a bug in Sandbox / Feature request in TwistyPlugin.

%TWISTY{
  link="%BUTTON{"%MAKETEXT{"Create New Topic"}%" icon="add"}%%CLEAR%" 
  mode="div"
}%
...
%ENDTWISTY{}%

generates nested <a> tags and spans.

Not sure what the best way to fix this is. TWISTY expects individual components for generating the link:
  • link - Link label for both show and hide links
  • showimgleft - Specify the url of an image that will be displayed with the show link at the left side of the link.

So inserting complex html where a label is expected is not valid use for the macro.

-- GeorgeClark - 14 Dec 2015

Twisty provides a way to use styled buttons.
%TWISTY{
  showlink="%MAKETEXT{"Create New Topic"}%"
  showimgleft="%ICONURLPATH{"add"}%"
  hidelink="%MAKETEXT{"hide form"}%"
  hideimgleft="%ICONURLPATH{"toggleclose"}%"
  linkclass="foswikiButton"
  mode="div"
}%

-- GeorgeClark - 19 Dec 2015
 
Topic revision: r8 - 08 Feb 2016, GeorgeClark - This page was cached on 03 May 2018 - 17:29.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License