Modifying the default EVN menu in 5.2.0

105 views
Skip to first unread message

Paul Frunza

unread,
Feb 10, 2017, 5:31:41 PM2/10/17
to TopBraid Suite Users
Hello,

I want to modify the default EVN menu in order to add another item which links to a custom page, in the manner show below:



I've done text search through all of the local composer files and the only place found where the menu items are defined seems to be in the teamwork.topbraidlive.org/ui/teamwork.ui.ttlx file (shown in the screenshot below). However, this is quite a large file (~13k lines) and it seems to define the UI elements for other projects as well, such as EDG. I suspect that it might be a generated file due to its size.



Is that the correct file where such modifications should be made? Is there a way to ensure that the changes appear only in EVN and not other places?

Also, we have an EVN instance (without EDG) on a dedicated server which is running an older version (5.1.4). Would there be any compatibility issues when deploying to this server?

Best regards,
Paul

Holger Knublauch

unread,
Feb 12, 2017, 12:20:36 AM2/12/17
to topbrai...@googlegroups.com
Hi Paul,

EVN (and its sister product EDG) provide various extension mechanisms that can be used to customize the appearance without modifying the system files (such as teamwork.ui.ttlx). SPARQL Web Pages (SWP) is used in most places, and others are entirely model-driven and depend on RDF data in some files.

For you specific scenario in 5.2, you have two options:

1) Apply a so-called override (http://uispin.org/ui.html#overrides) to the element that populates the menu: teamwork:MainMenu. To do that, create a new RDF/SWP file (ending with ui.ttlx), import teamwork.ui.ttlx and then create a subclass of teamwork:MainMenu that points at teamwork:MainMenu via ui:overrides. This mechanism would allow you to completely replace the main menu, e.g. you could start with the existing ui:prototype of teamwork:MainMenu and modify it.

However, I think what you need is something simpler, namely a menu item that open something on the right hand side of the screen:

2) Define a teamwork:HomePageTab and tell the EVN product about it. EVN will populate a tab for each instance of HomePageTab that it can find in any ui.ttlx file. I have prepared this in the attache file. Place this into your workspace (or upload it to the EVN server) to see the extra menu item.



The key triples of the example file are:

rdf:type teamwork:HomePageTab ;
  ui:prototype """
<div>Hello World</div>
"""^^ui:Literal ;
  rdfs:label "My HomePage Tab" ;
  rdfs:subClassOf teamwork:HomePageTabs ;
.

to declare the home page tab, and

evnproduct:EVN
  teamwork:homePageTab mainMenuExample:MyHomePageTab ;
.

to tell EVN about it. (Similar would be for EDG).

HTH
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mainMenuExample.ui.ttlx

sanjeev devireddy

unread,
Apr 11, 2017, 10:40:02 AM4/11/17
to TopBraid Suite Users
Hi Holger,
    I followed the second approach and I can see the new menu item. Now I want to edit the file mainMenuExample.ui.ttlx so that the content that gets displayed on the right hand pane can be updated. But I don't see ui:prototype label/section in the Resource Form of mainMenuExample.ui.ttlx. Normally in SWP Element Form the ui:prototype label/section is seen and that provides an editor. So could you please help me to understand that how the Resource form that is associated with mainMenuExample.ui.ttlx file  can be updated so that the changes reflect on the right hand side content.


Thanks,
sanjeev

Holger Knublauch

unread,
Apr 11, 2017, 7:59:28 PM4/11/17
to topbrai...@googlegroups.com
Hi Sanjeev,

I am not quite sure what you need here. Looking at the mainMenuExample.ui.ttlx file that I sent you, I left a placeholder for the main content, just with a Hello World for now. You could replace that with

<teamwork:Chrome>
    <div>Hello World</div>
</teamwork:Chrome>

to get the surrounding menu and header show up.

You then write about editing, and this is where I lack details. But in case you are looking for something similar to the Metadata form, which is switchable between view and edit mode, look at

    teamwork:MetadataProjectTab

for a stand-alone example.

If this doesn't help, please provide more specific details.

Holger

sanjeev devireddy

unread,
Apr 12, 2017, 2:13:28 AM4/12/17
to TopBraid Suite Users
Hi Holger,
       Below is the view/Form (mainMenuExample:MyHomePageTab) that I am looking for. Since I am new to the composer so it took time to figure it out. Using the editor under the ui:prototype, the content that gets displayed on the right hand side pane can be handled.

      Now, we have another requirement and it is to add a link (an anchor tag<a>) in the home page tabs menu and that link should open a new tab/page in the same browser. Could you please help us on this?






Thanks,
sanjeev
Auto Generated Inline Image 1

Holger Knublauch

unread,
Apr 12, 2017, 8:56:58 PM4/12/17
to topbrai...@googlegroups.com


On 12/04/2017 16:13, sanjeev devireddy wrote:
Hi Holger,

       Below is the view/Form (mainMenuExample:MyHomePageTab) that I am looking for. Since I am new to the composer so it took time to figure it out. Using the editor under the ui:prototype, the content that gets displayed on the right hand side pane can be handled.

      Now, we have another requirement and it is to add a link (an anchor tag<a>) in the home page tabs menu and that link should open a new tab/page in the same browser. Could you please help us on this?

This is not really supported. Each menu item there is opening up a tab in the main area of the screen. You could try to add a ui:override to teamwork:MainMenu, but this may break with version updates as we don't support that extension point.

The easiest work-around would be to replace the Hello World with a hyperlink that does open a new tab.

Holger

Sanjeev Devireddy

unread,
May 20, 2020, 8:35:22 AM5/20/20
to TopBraid Suite Users
Hi Holger,
    Is this solution can work with the TopBraid Enterprise Data Governance, Version: 6.3.0.v20191211-1757R? I tried importing the mainMenuExample.ui.ttlx file to my composer(TopBraid Composer Maestro Edition , Version: 6.3.0) but the classes view is not showing the expected classes like teamwork:HomePageTab (please check the below screenshot).

Actually we want add a new menu item in UI of TopBraid Enterprise Data Governance, Version: 6.3.0. Could you please suggest me the best way do that?




Thanks,
Sanjeev

On Sunday, February 12, 2017 at 10:50:36 AM UTC+5:30, Holger Knublauch wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
Message has been deleted

Pat Doyle

unread,
May 20, 2020, 10:46:36 AM5/20/20
to TopBraid Suite Users
Hi Sanjeev,  

Here is an updated example file that should work in the latest EDG 6.3.

Hope it helps,
Pat

To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/65698f0a-8fa8-4279-8508-fb97304bdedb%40googlegroups.com.
mainMenuExample.ui.ttlx

Sanjeev Devireddy

unread,
May 21, 2020, 6:58:29 AM5/21/20
to TopBraid Suite Users
Hi Pat,
    Thanks, it works. But, I see that the new tab(menu item) is shown under the "Governance Model" category. Is it possible to move this new/custom menu item outside of "Governance Model" category and to display along side the 3 categories (Dashboard, Asset Collections, Governance Model) but not under any category?



Thanks,
Sanjeev

Pat Doyle

unread,
May 21, 2020, 9:10:58 AM5/21/20
to TopBraid Suite Users
Sanjeev,

At current, the sections of the menu are hardcoded.  You could, again, add a ui:override to teamwork:MainMenu to add another teamwork:MainMenuSection, but this is still not an officially supported extension point so it may break with future version updates. 

You can change the location of the tab on the menu by changing the tab index for the tab you're adding - this will allow you to at least move it up the list or into a different section, but it will still not allow you to display it outside of the categories, I believe. 

Pat

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Sanjeev Devireddy

unread,
May 22, 2020, 8:49:45 AM5/22/20
to TopBraid Suite Users
Hi Pat,
    Thanks for you response. Could you please give an example on how/what to do for adding a ui:override to teamwork:MainMenu to add another teamwork:MainMenuSection? I understand that it is still not an officially supported extension point. But just want to give a try and see.


Thanks,
Sanjeev

Pat Doyle

unread,
May 22, 2020, 9:20:03 AM5/22/20
to TopBraid Suite Users
Sanjeev, 

Here you go.  Here are the steps I took:

Cloned teamwork:MainMenu
Renamed the class to mainMenuExample:MainMenu
Updated the ui:prototype with another teamwork:MainMenuSection
Added the ui:overrides statement pointing to the original teamwork:MainMenu

This is what you should see when you add the file into your workspace(I collapsed the sections for the sake of the image):
image.png



--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
mainMenuExample.ui.ttlx

Sanjeev Devireddy

unread,
May 26, 2020, 5:02:03 AM5/26/20
to TopBraid Suite Users
Hi Pat,
     Thanks for your response and I can see the changes by importing the file that you gave. After looking at these two options, our team decided to go with the option of showing the new/custom tab under "Governance Model" section but as the first Tab in the list. I randomly tried by giving the tab index as 100 and I can see that the new/custom tab is shown as the first tab in the list under "Governance Model" section. Now, my question is that what should be the actual/correct index for any tab, which needs to be shown as the first tab in the list under "Governance Model" section?




Thanks,
Sanjeev

Pat Doyle

unread,
May 26, 2020, 5:32:05 PM5/26/20
to TopBraid Suite Users
55 is the arg:min being passed to that main menu section:
    <teamwork:MainMenuSection arg:id="primary-nav-section-governance"
                                      arg:label="Governance Model"
                                      arg:min="55"
                                      ui:args="*"/>

So I believe that would be the most appropriate value to put on the tab you wish to have first on that list. 

But, ultimately, it just needs to be the lowest value relative to the rest of the items in the list. I believe 104 is the swa:tabIndex of the 'Governance Areas' page, which is why 100 works for you. 

Hope it helps,
Pat

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Sanjeev Devireddy

unread,
May 29, 2020, 6:24:12 AM5/29/20
to TopBraid Suite Users
Thanks Pat. It works.


Thanks,
Sanjeev

Sanjeev Devireddy

unread,
Jun 3, 2020, 6:12:42 AM6/3/20
to TopBraid Suite Users
Hi Pat,
   The example file that you shared works perfectly. But when create a brand new file (.ui.ttlx) then I don't see the new/custom tab. Please check the below steps, which I followed to create a new file and please find the attachment the for the file that I created. Could you please have a look at the file and let me know that what is wrong with file?

Steps:
1) Create RDF/SWP file.
2) Add a widget for the property rdfs:label.
3) import edgproduct.ui.ttlx & teamwork.ui.ttlx
4) Create a subclass of teamwork:HomePageTabs
5) Add some text for ui:prototype


Thanks,
Sanjeev
customTabPrivacyLink.ui.ttlx

Pat Doyle

unread,
Jun 3, 2020, 2:53:02 PM6/3/20
to TopBraid Suite Users
Sanjeev,

You're missing the triple telling the EDG product that there is another home page tab:

edgproduct:EDG
  teamwork:homePageTab customTabPrivacyLink:privacyTab ;
.

Hope it helps,
Pat

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Sanjeev Devireddy

unread,
Jun 4, 2020, 6:03:39 AM6/4/20
to TopBraid Suite Users
Pat,
      Could you please tell me the class/file that needs to updated for the triple telling the EDG product that there is a new/custom home page tab? Why am I asking this is that I don't see that triple/predicate in the mainMenuExample:MyHomePageTab class of example file mainMenuExample.ui.ttlx that you shared. Could you please help me to locate/update that triple in the example file that you shared or in the new file that I created?



Thanks,
Sanjeev

Pat Doyle

unread,
Jun 4, 2020, 6:24:00 AM6/4/20
to topbrai...@googlegroups.com
Sanjeev,

Open mainManuExample.ui.ttlx directly in a text editor. You will then see the extra triple attached to other resource which shows the class that you need to navigate to - edgproduct:EDG and the property you need to add your homepagetab to - teamwork:homePageTab

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Sanjeev Devireddy

unread,
Jun 4, 2020, 10:01:38 AM6/4/20
to TopBraid Suite Users
Reply all
Reply to author
Forward
0 new messages