We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Remove a component | Forum

Sean
Sean Mar 12 '14
Hi there,


Can anyone point me in the direction of the code I would need to remove components before the document renders?


For example, I am creating a plugin that will make full use of the right hand sidebar on a certain page. In order to do this I want to remove all current components that are in there.


To make it clear, I don't want to deactivate components, I know how to do that, I just want to stop them rendering on a certain page.


Any ideas?


Thanks!

Sean
Sean Mar 21 '14
*Bump*


Anyone? I just need to remove plugins from the sidebar when I particular page is rendered.

Sean
Sean Mar 22 '14
I have a right hand sidebar on my theme, which plugins can add widgets into - not the one on the left that I think you might be referring to.


Basically I am developing a plugin which will identify what page the user is on (I've done this and it works), then if they're on a specific page simply stop the rendering or initialisation of those widgets in the right hand sidebar.


There must a component remove function somewhere?

Daisy Team
Daisy Mar 27 '14
Sean, we have the overriding mechanism of some classes' instances including the widgets which allow you to replace the called instance with another one by binding the class.get_instance event. You can see the way this event is triggered in the /ow_core/ow.php file. Simply search for the getClassInstanceArray function.

However, Sean, I would like to warn you that these changes are quite complicated and can lead to serious consequence of some functionality damage.