url in menu item

Questions about XML that are not covered by the other forums should go here.
LBarth
Posts: 23

url in menu item

Wed Jul 26, 2017 3:06 pm

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
adrian
Posts: 2326

Re: url in menu item

Wed Jul 26, 2017 3:44 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
LBarth
Posts: 23

Re: url in menu item

Thu Jul 27, 2017 11:17 am

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

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 1 guest