Hello!
I am working on putting some links in the right sidebar on the activity page. Just there. I edited the file one_sidebar.php located in views/default/page/layouts/
I am planning to extend the view, but my problem is that I want to display such links only on the activity page.
Here's the file I edited:
Thanks!
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.
- Per Jensen@gillie
Per Jensen - 0 likes
- manfred salomon@lisha
manfred salomon - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- Cash@costelloc
Cash - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
You must log in to post replies.You can use if ((elgg_get_context() == 'activity')
hi friend,
don't change the core, do it like gillie says ;-))
@manfred I won't edit core files. I'm currently working on a theme for 1.8, and I wanted to add some stuff there.
@gillie Thanks for the tip!
@Dhrup Thanks for the help!!
In 1.8 I added the view core/river/sidebar for the activity page. Override that view and you don't have to check context.
Also, in general for the sidebar, you should override page/elements/sidebar before overriding a layout like one_sidebar.
Another new feature in 1.8 is elgg_in_context(). Context is now a stack. Example on the profile page the top level context is 'profile' and in a widget the 2nd context is 'widget'. Inside a widget you can do do elgg_in_context('profile') and it will tell you whether the widget is on the profile page. Calling elgg_get_context() will return 'widget' as it is last context to go onto the stack.
@Cash Thanks!!