We are running data center version of the confluence.
We have a requirement where we have to show subspace navigation element only in specific spaces.
Following is the way I have achieved this
<div id="categoryKeyInfo"> #if ($sitemeshPage.getProperty("page.spacekey")) $action.labelManager.getTeamLabelsForSpace($sitemeshPage.getProperty("page.spacekey")) #end </div>
The purpose of above code is to get the category information from the current space. As per the documentation and my testing getTeamLabelsForSpace gives us the categories of the space.
<script> document.addEventListener('DOMContentLoaded', function(){ //alert(document.querySelector("#categoryKeyInfo").innerHTML) if(!document.querySelector("#categoryKeyInfo").innerHTML.includes("Subspace")){ var subSpaceBar=document.querySelector("#navigationbarpro"); subSpaceBar.style.display="none"; } }, false); </script>
This above code finds if the space has category as "Subspace" and shows the SubSpace app navigation or it will hide it.
This approach is working but wanted to make sure that this is the right way to achieve this. Is there any better way to do this? Please let me know.
Hi,
you might want to contact Communardo (SubSpace vendor) on your question directly:
https://jira.communardo.de/servicedesk/customer/user/login?destination=portals
I'm sure, they will love to support you!
Best
JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.