Get page url in blocks preview

Hi everyone,

I’m having an issue when trying to create a custom block preview. I’m trying to create a button, much like the one in the docs that would lead to a virtual page. But for that, I need to get the url from the page where the block is created and I don’t find a way to get that, neither from content or fieldset.

Does anyone know how to do that?
Thanks a lot in advance!

How is the virtual page registered? They would usually appear in a pages field picker as well, unless they only exist in a route.

Well, I don’t really have access to the virtual page. Basically each block would have automatically its own virtual page, so I need to get this page URL back into the block preview.