How to hide carbon.super tenant domain from tenant API store.

If you need to hide carbon.super tenant domain please follow the instructions below.
in template.jag(/store/site/themes/fancy/templates/api/tenant-stores-listing/template.jag) paste following before this line(just after for loop). Change highlighted in blue color. 
<%for(var i=0;i< tenantDomains.length;i++){

if(tenantDomains[i] != "carbon.super"){
var site = require("/site/conf/site.json");
%>
<a href="<%= encode.forHtmlAttribute(encode.forUri(jagg.getSiteContext() + 
"
?tenant="+tenantDomains[i])) %>" title="<%=tenantDomains[i]%>"><li class="thumbnail span3 tenent-thumb">
<center><img src="<%=jagg.getAbsoluteUrl(jagg.getThemeFile("images/tenant-store.png"))%>" alt="">
<h3><%=tenantDomains[i]%></h3>
<span>Visit Store</span>
</center></a></li><%}}%>


Then it will filter out carbon.super from main store view. You can do this change using sub theme and override default page. To do that please follow this article about API Manager sub themes.


No comments:

Post a Comment

Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release

  Introduction In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great a...