Hi everyone how can I display widget using source code.
I used the following code
$top_row1 = elgg_view ('widgets/next_celebrations/content');
$body = elgg_view_layout('content', [
'title' => 'The title',
'content' => $top_row1,
'filter' => false,
]);
echo elgg_view_page('title test', $body);
But only the widget content is displayed. I want to display full widget with customize option .
What I am suppose to do ?
Best regard
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
You must log in to post replies.Thanks but still have the same problem. Only the widget content is displayed. I want to display full widget with customize option
Best regard
Of course, because you should register your widget with context where this widget is allowed http://reference.elgg.org/engine_2lib_2widgets_8php.html#a71d4a1df91d694dcbd0f4ff030cd4e76
You can not show the full widget as ElggEntity w/o creating of it.
Example for 'Blog' widget to show it on '/blog/view' page:
Note: you can do it easy with Widget Manager plugin (check out 'Extra widget contexts' option).