Forum Discussion

etisson's avatar
2 years ago

Create different CSS styles for category pages

We want to change the way our KB articles are shown to our customers. We do not want to show the author information for the article on any Khoros KB page.

I have been able to hide the author in the below pages through css

https://communitystag.lansweeper.com/t5/requirements/tkb-p/kb_requirements

https://communitystag.lansweeper.com/t5/requirements/scanning-commands-run-on-linux-computers/ta-p/7940

What I cannot figure out, though, is how to hide the author from these pages.

https://communitystag.lansweeper.com/t5/knowledge-center/ct-p/Knowledge_Center

https://communitystag.lansweeper.com/t5/knowledge-base/ct-p/KB_Main

The category pages are for the knowledge base only. We don’t want to hide the author information for the forum or other category pages.

Is there a way to hide the author information for the category pages (ct-p) for only the ct-p pages related to the knowledge base?

  • Either you can use different quilt for these categories so you can differenciate the class for these categories OR You can add a custom component on category page with below code

    <#if coreNode.id == "Knowledge_Center" || coreNode.id == "KB_Main">
       <style>
          .className {
              display: none;
           }
       </style>
    </#if>

     Note: Need to update the className

  • Either you can use different quilt for these categories so you can differenciate the class for these categories OR You can add a custom component on category page with below code

    <#if coreNode.id == "Knowledge_Center" || coreNode.id == "KB_Main">
       <style>
          .className {
              display: none;
           }
       </style>
    </#if>

     Note: Need to update the className