Currently, Koha has different ways of building the URI path when rendering links. Some of them are hardcoded, some rely on $cgi->url. We need to calculate them correctly to support arbitrary places to put Koha's intefaces in.
Hi Tomas, can you explain a bit more what needs to be done here?
Do you mean something like Catalyst's "uri_for"? https://metacpan.org/pod/Catalyst#$c-%3Euri_for(-$path?,-@args?,-%5C%25query_values?,-%5C$fragment?-)