Point to Outermost Container of Web block, don't create a new Span

I'm having a problem where I want to separate some functionality into web blocks, but once I place the information into different blocks, I lose the ability to reference the outermost container (div) of that block.

When you reference the ID of a Web block, Outsystems creates a <span> around that web block, instead of pointing at the div it is representing. This could also be solved if I could give that span of the web block a class, but I cannot.

This might be more of an Idea than something anyone could help me with.

Hi Jordan I think the div you want to reference is inside the webBlock scope thus you dont have acess from the outside.

One possible solution is to create your own outer div with an HTML block with a static id and then reference that.

Are you talking about having an un-escaped expression that adds the div with an ID inside of the web block so I have a predictable ID to target? Would break if I used that block in a list records though. But might help with some things.

Hi Jordan I think the div you want to reference is inside the webBlock scope thus you dont have acess from the outside.

One possible solution is to create your own outer div with an HTML block with a static id and then reference that.

Are you talking about having an un-escaped expression that adds the div with an ID inside of the web block so I have a predictable ID to target? Would break if I used that block in a list records though. But might help with some things.

Yes, if you need to use it in a list records you can pass an integer into the webBlock with the current row and add that to the ID.