Rendering Component in decorativeWidget API


(Clément Décou) #1

Hello,

I have a component to render ads in my discourse {{numeramaAdsBlock "side_ad"}} and i want to render this component inside the sticky sidebar in a topic. So i use decorateWidget to add my component inside the widget “topic-timeline-container”

export default {
    name: 'sidebar-topic',
    initialize(container) {

        withPluginApi('0.2', api => {
            api.decorateWidget('topic-timeline-container:before', dec => {
                // rendering my component with params
            });
        });
    },
}; 

How can i render my component with the params ? Thanks.

Edit : Up ?


Render a component within a Widget. (Using select-kit components within plugin code)
(Vinoth Kannan) #2

As per above quote looks like component in a widget is not possible. So rendering a component in decorativeWidget API is also not possible I guess.


(Clément Décou) #3

Humm thanks for the reply
I see this topics… but how can i “override” this “sidebar” without copiying code or rendering incompatible with a new update ? (Without widget)

There is no solution ?

Thanks


(Vinoth Kannan) #4

May be you should change your component as widget.

I don’t have any solution right now.