Forum Discussion

Quelyn's avatar
Quelyn
Genius
10 years ago

Changing Layout of "Action Buttons"

Hello!  I have been trying to move all of the action buttons to the bottom of the forum message, much like they are here on Lithium.  

From what I can ascertain, it appears that Lithium is hiding the rating display inline, and then adding it to the bottom of the message somehow.  

 

So I tried to make a new component "@secondaryActions@override", and I added the following: 

<@delegate />
<@component id="ratings.widget.rating-enum-display"/>

I'm just trying to get "Me Too" to show up on the bottom.  But I get this error: 

Freemarker template 'PureCommunityBanner' processing failed:
RenderQueueException:Render queue error in SetupRender[ratings/ContributionPage:ratingsenumdisplay]: ratingSystem

So, I was wondering if anyone else has been able to successfully do this?  Am I going down the wrong road here? 

 

 

  • I tried this and it seems like you can add the following component directly to your Forum Message Page. 

       <component id="me-too"/>

    Make sure to add this directly to the page and not to the custom component. Also, this Me Too button will only show up if the current user is allowed to give that rating (hence, will not show up for the author of the message)

     

    Regards,
    Chhama

7 Replies

  • Just an update, I opened a case with support and they suggested trying the following: <component id="me-too"/>

     

    When I try that I get the following error: 

    RenderQueueException:Render queue error in BeginRender[components/ComponentDisplayContributionPage:componentdisplay0]: unknown component id: me-too 

    I added a plaintext TEST to the component, and that showed up, so I know the @override is working.  

     

    Any help is greatly appreciated!

  • Hi Quelyn,

     

    You are getting a render error because you need to pass in the rating System you want to use. So, do something like this below:

    <@delegate />
    <component id="ratings.widget.rating-enum-display" ratingSystemRef="conv:forum_topic_metoo" />

     

    Hope this helps. 

     

    Regards,
    Chhama

  • Quelyn's avatar
    Quelyn
    Genius
    10 years ago

    ChhamaJ Thank you! So I was able to enter that into the component and save it with no error, but the "Me Too" button is still not showing within the component.  

  • ChhamaJ's avatar
    ChhamaJ
    Khoros Staff
    10 years ago

    I tried this and it seems like you can add the following component directly to your Forum Message Page. 

       <component id="me-too"/>

    Make sure to add this directly to the page and not to the custom component. Also, this Me Too button will only show up if the current user is allowed to give that rating (hence, will not show up for the author of the message)

     

    Regards,
    Chhama

  • Quelyn's avatar
    Quelyn
    Genius
    10 years ago

    Thanks ChhamaJ!  I did know that it only shows on posts not authored by yourself, and I have been testing that way.  I can confirm that adding 

    <component id="me-too"/>

    onto the "Forum Message" page moved it to the bottom.  Now I just need to figure out how to hide it in the body so that it only shows on the bottom.  Thusfar the CSS is affecting both.  But that's an easier problem to figure out.  This was very helpful, thank you!

     

    The only reason I went with the  "secondaryActions@override" route is that I wanted to include it within that component so that the two could be styled the same.  But, I can figure out the positioning. 

     

    Thanks, 

    Quelyn

  • Quelyn's avatar
    Quelyn
    Genius
    10 years ago

    It would be super helpful if someone from Lithium could give an example of how to accomplish this: 

    Screen Shot 2015-06-22 at 3.32.55 PM.png

     

    We want to have the same clean bottom button view, and it's proving difficult.  I have figured out how to add the "Me Too" to the bottom by adding the component to the "Message Page".   We can definitely keep trying new styling, but I think it would be great to do it the "Lithium recommended way" 

     

    Thanks!

  • Quelyn's avatar
    Quelyn
    Genius
    10 years ago

    OK, I figured out how to do the CSS for the in-line button and not the bottom.  Just had to specify the row that the button was in.  

     

    Thanks for your help ChhamaJ