Forum Discussion

gstelang's avatar
gstelang
Mentor
9 years ago

Access to Lithium custom component

Hi guys,

 

I have been developing on Lithium platform for a while and this has been bugging me. I have not got a definitive answer from anybody. 

 

We don't have access to custom components Lithium has built for us. For example, the kudos.widget.authors-leaderboard is the custom component which is not viewable or editable in Studio Editor. We have some customization requirement that involves changing this component a little bit or removing some elements. 

 

The problem is we have not been given access. Now, there're 2 solutions:

 

  1. Rebuild, which seems like a waste of engineering effort when we can just reuse what someone has already done for us. Rebuilding is also lot of work. Depending on the requirement, your work might involve fetching results from REST API + LiQL queries + HTML work + CSS styling.
  2. Tweak on top of what we have been given. If this is something smaller, targeted and makes sense, we can hack around with JQuery or CSS styles and make it look as per design. This is not really a good engineering practice and I don't want this to be a practice in my team.

 

 

Is this by design that we're not given access to certain components? 

 

Thanks

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)

    Hi gstelang

     

    yes - it is by design. The component you mention is actually not a custom one, it is an out of the box Lithium one. Depending on what you want to achieve, you may first try to override a core component (this essentially "wraps" the standard component with additional logic). If that is not sufficient, then you can create a custom one. 

     

    I do not necessarily agree with the statement around rebuilding: yes - there is a small learning curve (we do have plenty of training materials, code examples and this forum as a good source of inspiration) to get used to REST, but once you are up and running with it it becomes really powerful and it allows you to customize the platform to a degree that would be hardly achievable by just tweaking standard components. Once you are familiar with it, it is really quick to create and tweak custom components. We have convenience wrapper functions that allow you to call REST directly from a studio custom component without having to worry about authentication, HTTP handling etc...

     

    Of course - I do not know what you want to achieve exactly, so it may be more complex than I imagine! 

     

    Thanks