Forum Discussion

radhika_kundana's avatar
3 years ago

How to re-use component with different content for each grouphub page

I have created a hero component which has headline, paragraph and background image.

Now I would like to re-use same here component for different grouphub pages but WITH DIFFERENT CONTENT.

I wasn't able to find out any approach in Khoros docs, what would be the best approach to implement re-usability  of components? 

 

 

  • radhika_kundana, you are welcome!

    CCB = Custom Content Block (Admin > Content > Custom Content) – Updated on both stage and prod.

    Settings List Editor settings
    Admin > System > Settings List Editor – Updated on both stage and prod.

    The component is controlled by the Settings List Editor (SLE) field, which is available in Community Admin > System > Settings List Editor.  SLE fields operate through inheritance, so if a field is set at the top Community Node, it will be inherited by all child nodes.  Settings in a child node will override any settings from its parent or parents.

    Settings per Node: These are settings that will be more commonly set per node (changing based on which page you are on.) To remove an override and set it back to the parent value, erase the input value and save.

    Change the node by using the node selector (Choose) when you are in Admin.

     

     

  • radhika_kundana, you are welcome!

    CCB = Custom Content Block (Admin > Content > Custom Content) – Updated on both stage and prod.

    Settings List Editor settings
    Admin > System > Settings List Editor – Updated on both stage and prod.

    The component is controlled by the Settings List Editor (SLE) field, which is available in Community Admin > System > Settings List Editor.  SLE fields operate through inheritance, so if a field is set at the top Community Node, it will be inherited by all child nodes.  Settings in a child node will override any settings from its parent or parents.

    Settings per Node: These are settings that will be more commonly set per node (changing based on which page you are on.) To remove an override and set it back to the parent value, erase the input value and save.

    Change the node by using the node selector (Choose) when you are in Admin.

     

     

    • Here is what I have done:

      1.  Added custom content 2 component to page layout
      2.  Then go to Custom Content Block (Admin > Content > Custom Content) -> select custom content 2 from dropdown and enter required content. Fields also support html
      3. refreshed page and it worked like charm. 

      Is there any limit to add number of custom content widgets to a page? I was able to add 3 custom content widgets. 

  • Hi radhika_kundana, I recommend you to put the content into a CCB and change it via node, and you would probably need a setting list editor input for the background image.