Closed djay closed 4 months ago
@MAX-786 its a worse bug than I thought.
if you click on the hydra.pretagov.com url in the frontpage you get
and it seems to remember it because a reload gets the same thing
One fix as discussed, is that telling integrator to hook into the onRouteChange(path)
which will tell adminUI where to navigate, and all the other links in the frontend will do no change in adminUI and links will be opened as usual (its upto frontend if it wants to open in new tab or in the same tab ie iframe).
So something like this needs to be done by integrator if they want the routing in adminUI via iframe:
<SemanticMenu.Item
as={Link}
href={absoluteUrl}
onClick={() => {
bridge.onRouteChange(extractEndpoints(item["@id"])); // extractEndpoints(item["@id"]) -> pathname
}}>
{item.title}
</SemanticMenu.Item>
If the user clicks on an external link inside the IFrame then hydra already knows about it. There is no extra hooks needed. Just exit out of the editor and replace it with the url that was clicked
On Fri, 5 July 2024, 7:23 pm Mohammad K. Hussain, @.***> wrote:
One fix as discussed, is that telling integrator to hook into the onRouteChange(path) which will tell adminUI where to navigate, and all the other links in the frontend will do no change in adminUI and links will be opened as usual (its upto frontend if it wants to open in new tab or in the same tab ie iframe).
So something like this needs to be done by integrator if they want the routing in adminUI via iframe:
<HoverableDropdown item={item} subItems={subItems} onClick={() => { ***@***.***"])); // ***@***.***"]) -> pathname }} />
— Reply to this email directly, view it on GitHub https://github.com/collective/volto-hydra/issues/94#issuecomment-2210782698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKFZBN7CJREGUEOJDM2Z3ZK2F2LAVCNFSM6AAAAABKMOK5BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQG44DENRZHA . You are receiving this because you authored the thread.Message ID: @.***>
maybe as new tab? but should mimic the behaviour of normal volto