How to change the focus to another page anyone?

Is it possible to open another page in the app. window using @logseq/libs or any other method?

Do you mean something like window.location.hash = "#/page/pagename" ?

  • (from within a plugin, window is usually parent or

That may do it, but it leaves the problem of ascertaining the URL of a page (from a PageEntity object). Is there a way to do that?

Do you mean PageEntity::name ?

  • i.e. window.location.hash = "#/page/" +

Might work, let me try it.

parent.window.location.hash = `#/page/${pageName}`;

Does the trick, thanks.

The above solution I have found works with a development plugin (unpacked), but not with the same plugin installed from the Marketplace.

A solution that has been given to me on discord is:

var linkedPage = await logseq.Editor.getPage(linkedPageName);
logseq.App.pushState('page', { name: linkedPage?.uuid });

This I found however does not render the page title as H1. Also the menu is not normal, which I am told is a Logseq bug, reopen the page and it will be normal.