You can modify the action that a tab performs by modifying the ContentDefinition
for the action. Once you have modified the item, you must define the JavaScript that will run when the tab is clicked.
Note: Refer to Customization Best Practices before modifying definition files.
For example, you can modify the existing tab’s ContentDefinition
to point to your new tab definitions. In this example, the existing tab action is:
<content-definition> <id>existingTabAction</id> <app-id>workspace</app-id> <enabled-yn>true</enabled-yn> <object-type>ContentDefinition</object-type> <content-id>existingTabAction</content-id> <mime-type>text/javascript</mime-type> <body>atgChangeTab(atg.svc.framework.changeTab('DefaultTab"), null, null, null);</body> <url-yn>true</url-yn> </content-definition>
Create or modify the /atg/svc/framework/serviceFramework.xml
file in your new custom module and add the ContentDefinition
items for the tab action. Note that you must include the ID so that the object definition can be found during the combiner process. When writing the definition, you override only the attributes that you want to modify. To change the atgChangeTab
attribute to point to your myNewTab
, you would create the following:
<content-definition> <id>existingTabAction</id> <body>atgChangeTab(atg.svc.framework.changeTab('myNewTab'), null, null, null):</body> </content-defintion>