Skip to main content

How to set multiple values in data-ms-content attributes without duplicating widgets?

I guess this isn’t currently a feature but, would it be possible to include multiple values to an attribute, for example: data-ms-content="standard|pro" or perhaps data-ms-content="standard,pro". Maybe even better to include conditional values: data-ms-content="standard||pro" (for OR statements) and data-ms-content="standard&&pro" (for AND statements). I’ve just found a scenario where I’m having to include the same widget on the page twice so that I can include two different attribute values for standard and pro.

Thanks

1 comment

  • Duncan from Memberstack
    Duncan from Memberstack

    Hey Marc, I’ve run into this as well. I’ve found the best method for keeping all of the attributes in order is to wrap the item in multiple divs 👍 If you name the div the same thing as your gated content in Memberstack that helps too.

    https://docs.memberstack.com/hc/en-us/articles/10030013731227

    0

Please sign in to leave a comment.

Sitemap