Using Foundry Button or IconBar with custom-attributes doesn't work as ( I ) expected


I’m trying to implement the OverlayMenu stack from 1LD and would like it to be triggered by a button in Foundry’s IconBar stack.

While the trigger works as expected and described with a basic text-link and the custom attributes set to data-id=“UNIQUE_MENU_ID”, I can’t make it work through an IconBar button, nor from a foundry Button, using these same attributes.
This is worjing with the common RW button.

What am I missing ? Why is it working with the same parameters from the standard RW button and none of what I can do ( except from a link through a text paragraph ) is working with Foundry’s stacks ?

This is what is written in the stack’s description :

Bonus Tip

You can even use a basic link to toggle your menu by adding the following attribute to a link tag: data-id="UNIQUE_MENU_ID"

Just replace the UNIQUE_MENU_ID with your Overlay Menus id value.


Data tags will not work unless the stack is designed specifically to accept a particular Data tag This is just how RW and Stacks APIs work. The stack has to be expecting, and be coded, in anticipation of receiving a particular Data tag. The Button and Icon Bar stacks do not have data tag support because there are no standard data tags. Data tags can be anything, so I can’t code an infinite combination of data tag types.

Hi Adam,

Thank you for this quick reply.

Too bad, but I understand. I must use the extra stack from 1LD then. As they probably share some common APIs, is there any way around ( through any update ) in order to use Icon Bar in combination with your Mega Modal, which actually would perfectly answer my problem and would allow me to rely exclusively on Foundry for this purpose ?

Where should we post some enhancements ideas we may have, actually ?


I’m not quite sure I understand what you’re asking here. If you’d like to clarify I’d be happy to try and help, but I’m not grasping what you’re wanting here.

Instructions are found here:

Basically, I’m trying to open a modal through a button, which is exactly what your Modal stack is doing. But the styling options of your modal button are somehow limited, and you actually allow for 2 trigger types ( button and image ). Allowing for a third trigger ( by custom atttibutes and a modal unique name ) in order for it to be targetted from another button from another stack ( IconBar, Button, Jelly ), or even from the toggle button of your nav bar and mega modal stack ( if someone would like to have some new menu options appear in a full-screen modal, specially on mobile ) could be appreciated.

Thanks for both your answer and the feature requests link

That’s not currently possible. I’m doing a lLOY of Foundry work currently so perhaps sometime in the future (definitely distant future) this could be done. File the feature request and I’ll keep it in mind.