I have a requirement where I want to display components only relevant to the template being used to create a page.
This would mean that there will not be any dropdown that allows the user to toggle between component groups.
Could you help me in understanding how this could be implemented?
What AEM version are you using? I assume you are still using static templates and classic UI. This requirement in more recent versions of AEM would simply be defining which components are allowed to be used in a layout container in an editable template. This would be achieved in a policy. However for older AEM versions, its not as straightforward.
As you are on AEM 6.3 - I recommend that you go through all sections here.
Learn about editable templates and polices for layout containers. This now reflects best practice for AEM 6.3/6.4. Using Polcies, you can control which components an authro can use in a given layout container. It such a better solution then trying to hack the side kick by changing JS code.
Using Classic UI and side kick is not best practice no longer. Take advantage of editable templates, polcies and all that is shown in the Weekend 6 part tutorial.