Displaying a Tab on the Part Information and Parts List Page
You can display a custom tab or enable an existing tab for display on the part information and parts list pages.
Displaying a Tab on the Part Information Page
Follow these steps to display a tab, custom or existing, on the part information page:
1. Open the customization.js file located in the directory <HOME>/SW/SW/Applications/Windchill.ear/codebase.war/delivery/app, where <HOME> is the path to the installation directory for PTC Arbortext Content Delivery.
2. Include the logic to add the custom or enable an existing tab in the after method. Access the enabledTabServiceProvider.setEnabledTabsCustom custom function to add the logic.
For example, to add a custom tab ADDITIONAL_DETAILS on the part information page, add the following logic in the after method:
after: function () {
module.config(function (enabledTabServiceProvider) {
enabledTabServiceProvider.setEnabledTabsCustom(function (part, modelData,
enableDocumnt Tab, isRecommendation0n
relatedDocumentsData, isCatMode) {
var config = {
enabled: { }
};
/*Add your logic here. The following logic serves as an example and must be use for reference purposes only */

if (part.domainTypeId === "PartsListItem") {
part = part.objects.associatedPart;
}
if (part.attibutes.hasSupersession === "true" || part.attributes.hasHistoricalSupersession === "true"
|| part.attributes.hasHistorilcalXref === "true" || part.attributes.hasXref === "true") {
config.enabled.SUPERSESSIONS = true;
}else {
config.enabled.SUPERSESSIONS = false;
}
if(part.attibutes.isStopPart && part.attributes.isStopPart === "true"
&& part.attributes.hasHistoricalSupersession === "true"
config.enabled.SUPERSESSIONS = false;
}
config.enabled.ADDITIONALDETAILS = true;


return config;
});
});
}
}
3. Skip this step if you are displaying an existing tab. Add the custom tab details to the Part.tmpl.html and OrphanPart.tmpl.html files located in the directory <HOME>/SW/SW/Applications/Windchill.ear/codebase.war/delivery/templates/title.
For example, you can add the following details for the custom tab ADDITIONAL_DETAILS in the Part.tmpl.html and OrphanPart.tmpl.html files:
</li>
<li class="ptc-parttab-layout" data-ui-sref-active="active" data-ng-if="tabConfig.enabled.ADDITONALDETAILS">
<a data-ng-bond="::'ADDITIONAL_DETAILS' | translate">
</a>
</li>
* 
This example includes the custom tab entry in the HTML template only. Based on your requirements, you must add a new state containing the onclick action and other details related to the custom tab in the angular.js file.
4. Run the following command to minimize the client: <ANT_HOME>/bin/ant -f <HOME>/SW/SW/Applications/Windchill.ear/codebase.war/delivery/minimize.xml minimize, where <ANT_HOME>is the path to the ant installation directory.
5. Clear the cache from your browser and refresh the application user interface. The custom tab is displayed on the part information page.
Displaying a Tab on the Parts List Page
Note that if you enable an existing tab, the tab is automatically displayed on the parts list page.
Follow these steps to display a custom tab on the parts list page:
1. Add the custom tab details in the PartP.tmpl.html file located in the directory <HOME>/ SW/SW/Applications/Windchill.ear/codebase.war/delivery/templates/title. For example, to add a custom tab ADDITIONAL_DETAILS on the parts list information page, add the following details:
</li>
<li class="ptc-parttab-layout header-location" data-ui-sref-active="active">
<a data-ng-click="On click action should be added here">
<span data-ng-bin="::'ADDITIONAL_DETAILS' | translate">
</span>
</a>
/li>
* 
The example includes the entry for the custom tab in the HTML template only. Based on your requirements, you must add a new state containing the onclick action and other details related to the custom tab in the angular.js file.
2. Run the following command to minimize the client: <ANT_HOME>/bin/ant -f <HOME>/SW/SW/Applications/Windchill.ear/codebase.war/delivery/minimize.xml minimize.
3. Clear the cache from your browser and refresh the application user interface. The custom tab is displayed on the parts list page.
Was this helpful?