PopDrop triggered by SVG Icon

I wanted to trigger a PopDrop menu by clicking on an SVG Icon (originally Source-SVG @habitualshaker) after entering the needed attributes into the link menu, but failed. Checking/ copying the PopDrop demo, it worked well with the attributes entered in the button link. Finally used the ‘BP SVG’ stack: it worked when using the explicit fields in the stack settings, but not when trying to enter the attributes in the link window …

The HTML code revealed that the proper data-pop-drop=’…’ was missing in the link, whenever it did not work (you might say: “duh, obviously”). Hence the question is rather, how come that the attributes entered in the link window, did not show up in the code when using an SVG stack, but worked with a button stack ? Am I too dumb to enter the attributes correctly ?

Button setting and generated HTML code - works:


BP SVG stack setting - works:


SVGCode

BUT … SVG with link attribute - doesn’t work (the screenshots were done with the BP SVG stack, but identical problem also with the Source-SVG stack):


SVGNoCode

Thx for sharing your insights again, cheers

(RW 8.5.1, Stacks 4.0.4)

I did the link setup a different way with the svg stack. I’ll fix that up. What you are trying would work with the source button stack as the link setup was done differently there.

Stacks didn’t used to be great at allowing devs to add in their own custom classes / attributes from the settings and from RW url settings but it is much better now. As such some stacks still just build up their own link attributes using info you add in the stack settings instead.

1 Like

What @habitualshaker said; until recently, Stacks using a link setting needed to form the link code themselves in order to use custom classes and attributes ii.e. the only time it would work was if clicking the orange link button on a piece of text etc and not a link button in the stack settings. For this reason ButtonPlus2 and BP SVG had a separate attribute setting.
This is now fixed in Stacks 4 and new stacks can operate more intuitively via the RW link dialog like the Source button does and SVG will now do soon

Old stacks will have to stay as they are until deprecated as I would break existing users setups

1 Like

Thank you both (@tav, @habitualshaker) for your detailed explanations - as plain users, we sometimes do not understand the complexity under the surface, hence logic can fail ;) Since the BWD stacks work with the extended stack settings, and the Source stacks already or soon will work as well, this ‘problem’ will soon be a thing of the past, i.e. solved for me. Cheers.

1 Like

Just a note to say that v1.2.4 of the Source Addons fixes this for the SVG stack (and v1.2.3 of the regular Source stacks fixes it for the Image stack). Check for updates in RW to get these.

3 Likes

Excellent - Thank you !