Custom attributes in button


I’m trying to implement the OverlayMenu stack from and would like it to be triggered by a button ( actually one from Foundry’s IconBar stack but it doesn’t appear to be related to this 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 a button, using these same attributes.

This is what is written :

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.

What am I doing wrong ?


Do you have a test page published with the text link that works and the button that does not?

That would be the best way to get help.

Or you could post screenshots of the entire setups for both working and non-working parts.

Asked and answered here:

TL;DR – Data tags are not standardized. Each stack has to be specifically coded to have a data tag included in order to be able to add them via RW’s Add Link panel. These Foundry stacks do not have a specific data-id tag hard coded into them to allow this.


Thanks Doug, but as Adam explained, it’s something specific to Foundry. I did another test with a common RW button and it works fine actually, even if this doesn’t directly solve my problem.

After examining how 1LD’s ‘toggle’ works in the page source, and some experimenting, this works as a button link for me. MegaMenu is the id I gave to the Overlay Menu – replace with yours.

1 Like

Excellent ! Thank you. Actually, I had seen the “overlayMenuToggle” class and this “overlay_menu_my_menu_id_1” but didn’t tried that way.

Edit : It doesn’t. Actally, this works without any change from the recommanded setup Capture d’écran 2021-10-10 à 19.50.11 with a RW Button, but not with foundry stacks buttons.


Interesting, mine was with a Source button – it didn’t work with the recommended setup.

Here is a sample with CleanMenu:

1 Like


@joemart1951 Thanks for sharing such a piece of great information. Its really helpful for lil peep shop.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.