url in menu item

Questions about XML that are not covered by the other forums should go here.
LBarth
Posts: 26
Joined: Mon Mar 04, 2013 1:42 pm

url in menu item

Post 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_sup ... ing>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: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: url in menu item

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
LBarth
Posts: 26
Joined: Mon Mar 04, 2013 1:42 pm

Re: url in menu item

Post 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
Post Reply