Dear members,
created a plugin which will show a page with some tabs. I want to add a page menu to the side bar and clicking on that menu i want to load a new page with some other tabs...
what changes should be made in page handler ($page){
}
thank you
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.
- Thuvalpakshi@thuvalpakshi

Thuvalpakshi - 0 likes
- DhrupDeScoop@Dhrup2000

DhrupDeScoop - 0 likes
- Thuvalpakshi@thuvalpakshi

Thuvalpakshi - 0 likes
- kisssssss4ever@kisssssss

kisssssss4ever - 0 likes
- iionly@iionly

iionly - 0 likes
You must log in to post replies.Here is my code
This is the index.php file
and this is my filter overriding file
I want to create a page menu in the side bar... on clicking that it should load a new page with some other tabs.. hows it possible?
before
$body = elgg_view_layout('content', array(
'content' => $content,
extend viz --
$content.=$MySideBarPageMenu; // 7 have css to control MySideBarPageMenu's layout.
what about adding $vars['page'] = $page[0]; and so on ..?
@Satheesh PM I am sorry maybe I am not helpful but I have one thing in my mind now. I would like to keep my all menu buttons from my elgg default theme to the very left side of the main home page. And I wanna remove the complete menu from the header of my elgg default theme.
You are asking the same thing? I would like to have that, all menu instead of in header wanna show in the very left side and if they are sicky that would be more great.
Awaiting for your kind suggestion/ response.
Cheers
I've got it working to have a page with custom tabs (among other pages used by this plugin) and a sidebar with links (to this page and the others).
The pagehandler in start.php looks like this for the page with custom links:
Then I have the pages files that build up the custom tab page (tidypics/pages/lists/mostrecentimagesall.php, tidypics/pages/lists/mostrecentimagesowner.php and tidypics/pages/lists/mostrecentimagesfriends.php). For example in mostrecentimagesall.php the page is getting displayed with this code (of course you need to populate $area2 and $title with the desired content before):
In 'filter_override' the 'selected' => 'all' is the identifier of the tab (more about that below). The sidebar gets created by the view tidypics/views/default/photos/sidebar.php. The 'page' => 'all' is an identifier that can be used in the sidebar view to populate the sidebar depending on the specific page.
Filter override is in tidypics/views/default/photos/filter_override/mostrecent.php:
Here you see which pages should be behind the tab links. The url is resolved with the pagehandler. The $vars['selected'] variable is populated by the elgg_view call of the 'filter_override' attribute.
The sidebar menu is created in the tidypics/views/default/photos/sidebar.php view:
The menu items are created with elgg_register_menu_item(). The href is again resolved with the pagehandler. The 'name' should be something unique. As the sorting of the menu items is done by name by default you can define the order of the menu items in the sidebar also by giving suitable names to the menu items (A10_ before A20).
You also see
Here the value of 'page' is extracted. This value is set when calling the sidebar view in the elgg_view_layout() call in tidypics/views/default/photos/filter_override/mostrecent.php. What you see in sidebar.php is that I define two sidebar menu items that get displayed on all pages (within the tidypics context). The if-clause
will display the following content of the sidebar only when called by
In case of the upload sidebar items these are included from another view (photos/sidebar/quota) respectively.
I hope you can follow my explanation how you could build up a custom page with tabs including sidebar menu items. I'm not ready yet to upload a tidypics version where I've implemented such a page. Hopefully, I can publish at least a version on github soon. Then you could also see the implementation "live".