Forum Discussion
Hi bryanpollack ,
I don't think the dropdown option is available as a separate standard component in Forum Topic Page , its a part of the message-list component.
If you want to use the dropdown option inside a custom component in that page , a work around would be to manipulate it using jQuery. Here is a sample code that I have used.
To move the dropdown option inside my custom component.
jQuery('#customcomponent').append(jQuery('.lia-message-options'));
To copy the dropdown option to custom component.
jQuery( ".lia-message-options" ).clone().appendTo( "#customcomponent" );
Hope that helps.
Thanks,
Sam
The only way I could get that to work would be if I can get the message-list view to display posts the same as my custom one. I'm using the call "/threads/id/${threadId}/messages/threaded?restapi.format_detail=full_list_element&page_size=25" to get my data and I'm displaying it in the same order as it comes back. Is there any way to get message-list to display the posts in the "threaded" view? Thanks!
- samudhraa11 years agoExpertJust to confirm my understanding , you have done the whole thread list view of messages as a custom component. Now you would like to display options dropdown , for each message. Is that correct ?
Out of curiosity , Is there a specific reason you created the entire thread view as a custom component ?
Thanks.- bryanpollack11 years agoAce
That's correct. We want a very custom look on our forum topic page. We want certain things displayed in each message that aren't in the provided message-list and the layout needs to be very different from what's provided. I didn't see any other way to achieve what we wanted.
- samudhraa11 years agoExpert
As far as I know , there isn't a way to use the standard dropdown option in your custom thread list. (Because the dropdown actions are tied to the each message id of the thread) . Here are a few work arounds that I can think of ,
1. Include the standard message list , hide it and clone and place the options for each message. Then you would have to manipulate the links of the option a tag , with your message id and check if the desired action takes place. As we are doing the whole thing as custom , it might be better if you could choose the options that are required and hide the rest.
2. What we usually do , is use the standard thread page - because of its in built functionality and context setting .But we have done extensive customization to change the look and feel and add/remove other stats , custom components for each message using jQuery.
3. Choose the features that you would need from dropdown , and create your own custom components to perform the actions , using REST api.
I am not sure , which one of these would suit your requirement . But I hope one of it helps.
Thanks,
Sam
Related Content
- 5 years ago