Forum Discussion

pp_01's avatar
pp_01
Mentor
7 years ago

Removing OOTB Labels component from OOTB topic-message component.

Hi everyone,

 

On our Forum Topic Page, we have the OOTB topic-message component positioned in the main-content. I would like to know that if there's any way I can add any xml parameters to remove the OOTB  Labels component which is coming in side the topic-message component so that all the other content coming inside the topic-message component can be retained and only the Labels component can be removed. Thanks in advance.

  • Hi pp_01,

    You can achieve your requirement by either removing the component or in case you want to do with parameter approach then yes you can pass XML parameter such as visibility="hide" and fetch the value of that parameter inside custom component using the following method :
    <#assign visibility = env.context.component.getParameter("visibility")!"" />
    After that wrap the labels component according to your condition in if tag.

6 Replies

  • pp_01

    You can remove <labels> component from the ForumMessage Quilt.

    <community-URL>/t5/bizapps/bizappspage/tab/community%3Astudio%3Apage-editor?page=ForumMessage

  • pp_01's avatar
    pp_01
    Mentor
    7 years ago

    Thanks Neha. This can be an answer to my question but the requirement is something like only for the ForumTopicPage, labels should not come but if the Forum Message quilt is directly being used somewhere else, removing the labels from Forum Message quilt can cause issues. That's why I was I was looking for another approach. Apart from using css or the removing labels from the Forum Message quilt, is there any other way like are there any parameters through which it can be achieved.

  • nehaSharma's avatar
    nehaSharma
    Expert
    7 years ago

    pp_01

    You can achieve this by :

    1) Create a Custom ForumMessage Page and Map it to desired Forum Topic Page in the Admin section.

    2)  Create a Custom component and add it to the  ForumMessage Page Quilt with the following conditions -

    <#if page.name != 'ForumTopicPage'>

         <@component id = 'labels' />

    </#if>

  • ClaudiusH's avatar
    ClaudiusH
    Khoros Alumni (Retired)
    7 years ago
    In a standard Lithium Community setup the ForumMessage quilt will only be used in the ForumTopicPage layout, the message preview tab in the post editor and the Message lightbox preview in Spam Quarantine.
    So if you are okay with not having the labels component show there I would recommend going for the approach to edit ForumMessage.
  • pp_01 - Just to add to ClaudiusH answer. This quilt is also being used on ReplyPage, EditPage, PostPage (Preview mode). You can hide if you are to hide labels from those pages as well or you can go with nehaSharma solution.

  • Hi pp_01,

    You can achieve your requirement by either removing the component or in case you want to do with parameter approach then yes you can pass XML parameter such as visibility="hide" and fetch the value of that parameter inside custom component using the following method :
    <#assign visibility = env.context.component.getParameter("visibility")!"" />
    After that wrap the labels component according to your condition in if tag.