Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-18-2010, 02:59 PM
Junior Member
 
Posts: 7
Default custom context menu links

Is it possible to add custom html to a right click context menu?

I have a context menu with several menu items and when a menu item is clicked a different url should open in a new browser window. So far I have it working with xml but there are a couple of problems.

1. The window does not open in a new tab even though I have the firefox setting "new pages should be opened in tabs" selected.

2. When the user clicks on a second menu item, instead of opening a new window it overrides the first window that was opened.

To fix this I could just use some custom html to add my own links to the context menu but I am not sure how to do this.

I have also tried javascript to open the pages which works a little better but I still can't get the external pages to open in new tabs without overriding a previously opened tab.

Any help would be appreciated.
Reply With Quote
  #2 (permalink)  
Old 01-18-2010, 03:29 PM
Junior Member
 
Posts: 7
Default

Ok I figured this out. If you need links in your context menu just htmlencode them and put it in the label attribute. For example
Code:
<menuItem label="&lt;a href=&quot;/path/to/page.php&quot; target=&quot;_blank&quot;&gt;Link Name&lt;/a&gt;" id="some_id" />
Reply With Quote
  #3 (permalink)  
Old 01-18-2010, 05:21 PM
Zimbra Employee
 
Posts: 105
Default

There are a few panel item menu examples here:

ZCS 6.0:Zimlet Developers Guide:Example Zimlets - Zimbra :: Wiki

Also, check this out as a reference for the XML tags in the Zimlet Definition File:

ZCS 6.0:Zimlet Developers Guide:Zimlet Definition File Reference - Zimbra :: Wiki
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.