Forum Discussion

bryanpollack's avatar
11 years ago

Leverage default components

I'm looking to make a lot of new custom components. The thing is, many of them are very similar to the existing default components provided by Lithium. Is there any way to get the code for (or duplicate) an existing component so I can further customize it? Thanks!

  • hi Bryan,

     

    most of the core components are developed with Java, not Freemarker. So they can't help you with your custom component development. 

     

    many core components allow certain configuration. for example,  add/remove/reorder message listing columns, you may want to leverage that instead of re-create the functionality.

     

    I hope that my answer helps.

  • MoniqueL's avatar
    MoniqueL
    Lithium Alumni (Retired)

    Another argument for using core components as much as possible, is that some components contain functionality/UI elements that are not visible or obvious to all users. For instance, the board browser lists that you see on a Forum page (that lists all the topics in a board). When logged into a community as an Administrator or a Moderator, you'll note that now you'll see more options in the Options drop down menu on the board page. Some of these options include batch processing, which when enabled, will add a column of checkboxes for each topic to allow for mass moves, deletion, etc. Another option is the 'Show Moderator Flag' which displays an icon that indicates if moderator has already read a message, etc. 

     

    Not every component has these type of features that need to be taken into consideration, but it's best to do some research first of what’s possible with admin configurations + UI/Studio tweaks and a cost/benefit analysis to see if it’s worth rebuilding a component from scratch (to add/remove functionality, re-arrange the ui, etc.)

  • HaidongG's avatar
    HaidongG
    Lithium Alumni (Retired)

    hi Bryan,

     

    most of the core components are developed with Java, not Freemarker. So they can't help you with your custom component development. 

     

    many core components allow certain configuration. for example,  add/remove/reorder message listing columns, you may want to leverage that instead of re-create the functionality.

     

    I hope that my answer helps.