Monday, August 8, 2016

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="">
<span>Visit Store</span>

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