Page 1 of 1

url in menu item

Posted: Wed Jul 26, 2017 3:06 pm
by LBarth
Hi,

We have created a plugin for a standalone Oxygen installation, I would like to add an entry in a menu to link to a 'help' website, something like (in the .framework file) :

<menuItem>
<field name="link" href="https://www.oxygenxml.com/technical_support.html"><String>Syncro Soft</String></field>
<menuItem>

Is there a way to achieve this ?

Is there documentation about what can be used in a <documentTypeDescriptor/> in the .framework file ?

Best regards,
Lionel

Re: url in menu item

Posted: Wed Jul 26, 2017 3:44 pm
by adrian
Hi,

By "link to a 'help' website" I assume you want the link to be opened in a web browser. This is possible with the help of a custom action.

Is there documentation about what can be used in a <documentTypeDescriptor/> in the .framework file ?
No, I'm afraid there isn't. You are not supposed to edit the .framework files manually, hence there is no need to document their structure. You should use the Oxygen GUI to edit a Document Type Association (Options > Preferences)

Regarding your menu action, first you have to create a custom Action in the Document type editing dialog, Author tab, Actions subsection. Give it an ID and a Name (e.g. openInBrowser), specify for Activation XPath: true() (means always enabled) and Choose the builtin operation ro.sync.ecss.extensions.commons.operations.OpenInSystemAppOperation. For resourcePath specify your URL between single quotes. e.g.'https://www.oxygenxml.com/technical_support.html'. mediaType can be left to the default "html"
Go to the Menu subsection, look in the Available actions list (left) for your action and add it in the desired place from the menu structure (Current actions tree) on the right side. In the Author mode you will find it in the application menu with the framework name.

Regards,
Adrian

Re: url in menu item

Posted: Thu Jul 27, 2017 11:17 am
by LBarth
Hi Adrian,

Thanks for your reply, it works nicely.
I should have looked the GUI, the documentation I was searching is here in fact.

Best regards,
Lionel