Forum Discussion

guidoterlouw's avatar
11 years ago

Recommendations Slim Mode in Custom Component

When I try to load the Recommendations into my custom component with the attribute mode set to slim. The slim mode is not picked up. I used the tag "<@component id="recommendations.widget.recommended-content-taplet" mode="slim" />" to render the component.

 

When I add the Recommendations component to a page next to my custom component and set the attribute mode to slim on this component. The Recommendations component in the custom component changes to slim mode but the Recommendations component that we added seperatly to the page remains in wide mode.

 

Is there another way to force my Recommendations component in the custom component to render in slim mode?

  • Hi Michael,

     

    No, we just styled the component and hidden the elements that we did not want to see.

     

    Cheers,

     

    Guido

  • I also have the same problem: The mode parameter is not respected when you include the component within another custom component.

    IMHO hiding the unwanted information through CSS is just a temporary workaround and not the solution. Depending on the mode the information is rendered in a different HTML structure: 

    • slim mode - the information is presented as an unordered list <ul>
    • wide mode - the information renders the data within a table <table>

    I think this is a bug, that should be fixed.

      • nibo's avatar
        nibo
        Mentor

        Hey peterlu,

         

        thanks for your reply. The problem in my case is unfortunately not with the recommendation component.

        I am embedding the components forums.widget.recent-messagesforums.widget.recent-threads and kudos.widget.authors-leaderboard not directly within the quilt but through a custom component, because I have a custom logic check if I should embed them, or not.

        The mode parameter doesn't work in none of them, but when I embed the components directly in the quilt everything works as expected. So I assume this is a general bug and not specific to the recommendations.

  • Hi guidoterlouw,

     

    I have the same problem you described. Have you found any solution?

     

    Regards,

    Michael

    • guidoterlouw's avatar
      guidoterlouw
      Guide

      Hi Michael,

       

      No, we just styled the component and hidden the elements that we did not want to see.

       

      Cheers,

       

      Guido

      • micha80's avatar
        micha80
        Expert

        Hi Guido,

         

        actually I am doing it the same way.

         

        Thanks for the reply,

        Michael

  • There wasn't much of documentation available earlier but now you have so much of information associated with each of the available contract components on the Page tab in studio which lets you know where to use the Slim/Wide mode and how it'd appear. If you don't get through, use the approach which Tyson has suggested, using CSS to hide additional detail in your wide mode and make it slim :)