Forum Discussion

aswani_kintali's avatar
10 years ago

Overriding a Component

If we override a component with @override , and include component in our page, iwill it use overridden component by default or should we include ovverriden component explicitly?

 

Example:

I m overriding abc component , abc@override. In page should I include abc or abc@override?

<@component id="abc"/> , will it work?

    • hpandey's avatar
      hpandey
      Ace

      But look and feel i.e. CSS would be same as OOTB. How to override that?

      • PerBonomi's avatar
        PerBonomi
        Boss

        Add your own css either in Stage's style section, or even inline, in the component itself.

         

        Also wanted to mention that if you override a component you can add <@delegate/> in the code. This will leave the oob component in tact and add whatever code you want below it. I use this,for example, to add options to menus.