Is it possible to extend every view with my plugin view, or do I have to count them manually in start.php?
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
- Sarah@sarah
Sarah - 0 likes
- Adam@amustafa
Adam - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
You must log in to post replies.Just unextend/extend those views that you want to use.
Learn it: http://learn.elgg.org/en/1.11/guides/views.html#extending-views
Thanks, Okay, I know that guide, but if the plugin view should be shown on every elgg page, I have to insert all views manually into start.php? A good example for this requirement is the Shareaholic plugin which shows buttons fixed on the bottom left side. This is also only shown on the start page and has the init option:
elgg_extend_view('object/summary/extend','Shareaholic/Shareaholic');
Isn't there any possibility to see this on every (internal) page?
I know it's been a long time since you asked this question but I came looking so I figured someone else might too.
I don't think there is a clean way to do what you're describing, however you can contextually extend whatever view they all have in common. For example, most likely all of your view will eventually run through the "page/elements/body" view (or "page/layouts/content", etc).
So your start.php can look something like this:
I use this to add an AJAX modal to plugin forms.
Adam, we recommend moving away from the pagesetup event if possible. It will likely be formally deprecated soon.
Problem being it's tied to the first elgg_view() call, which is a very unreliable indication of "about to build a page".