How can I programmatically get this Widget shown on another Page?
How can I programmatically get this Widget shown on another Page?
Hi Marina,
There you will find the list of widgets available in the plugin with the information about where they should display (User Dashboard page, User Profile Page and in any other custom page).
$widgetService = BOL_ComponentAdminService::getInstance(); // You already had this line in your plugin's activate.php since there is a widget in place.
$widget = $widgetService->addWidget('Widget Class Name', false);// This line also you can see in your plugin.
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_PROFILE);// This code is responsible to display in which page the widget should display.
$widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_RIGHT); // This code is responsible for the position that the widget should display in that page.
Since you said that the widget is showing in dashboard page, you can see a line of code which consist of PLACE_DASHBOARD in your activate.php
Also go to this page to know about widgets https://docs.oxwall.org/dev:begin:widget
The above line says true at the end of the slidedshow activate.php. Does it matter if it set to true or false?
I took out the // on the line with PLACE_DASHBOARD, did debug, refresh, put debug back to false, but the Slideshow still isn't showing up in the User Dashboard on the Admin side. What am I doing wrong?
Thanks..