Forum Discussion

matthieul's avatar
5 years ago

page-options component

Hello,

I try to override a component via Studio : 

The component is : community.widget.page-options

I created a custom component with a the name : 

community.widget.page-options@override

I added the code inside : "lorem <@delegate />"

Do you know why this custom component doesn't display on CategoryPage ?  

Thanks

 

  • AmyS matthieul yap, that's exactly it =)....but just in case it wasn't clear: You do NOT specify @override when "adding" the component anywhere (in quilts, other components etc.), the component ID stays the original one, that's the point of @override, you don't have to change your components in hundreds of quilts if you want to "override" an original one...

  • AmyS's avatar
    AmyS
    Khoros Alumni (Retired)

    This may be completely unrelated, but I know that until relatively recently (18.12 maybe?), the category page did not even have a page options component available. So, if it was in an included quilt (usually the header quilt) it would not have rendered anything.

    When we were rolling out a feature that introduced some options at the category level, we noticed that a lot of sites had simply removed the component from their category page's header quilt in Studio, and they had to add it back in to access the feature (category subscriptions). Perhaps the site you're working on is in this state?

    • Thanks AmyS,

      I don't think i'm in this case. because if i display the real component it's display on the page.

      my custom page : 

      <quilt layout="one-column" nestable="false" disableTopCssClass="false">
      <add to="common-footer">
      <component id="quilt:Footer"/>
      </add>
      <add to="main-content">
      <component id="homepage-community-bloc"/>
      </add>
      <add to="common-header">
      <component id="community.widget.page-options@override"/>
      <component id="community.widget.page-options"/>
      </add>
      </quilt>

      If I reload my page : the first one doesn't display and the native component is present

      • MattV's avatar
        MattV
        Khoros Staff

        If you have a component name called "community.widget.page-options@override" you still refer to it as "community.widget.page-options" in your page XML, and you'll get the overridden version of the component.