-
Notifications
You must be signed in to change notification settings - Fork 82
Rendering menu items #288
Comments
Current menu render does not support ACL, will be added in future. But developer can use Events |
I did some research and found that all route names for menu items we can get using Using these methods, we can get the name of route. Very little left to do — add a simple method to Routes that it was possible use them like this: Route::set('page', 'page(/<action>)(/<id>)(/p<page>)', array(
'id' => '\d+',
'page' => '\d+',
'action' => 'index|list|view|add|edit|delete|term|tag'
))
->perms(array('perm_name_1', 'perm_name_2', 'perm_name_3', ...))
->defaults(array(
'controller' => 'page',
'action' => 'index'
)); Where @sandeepone What do you think about this? |
Good idea.. |
@sergeyklay at request level we could not determine the permission of the menu item for pages/blogs, since the route exists and the page/blog may be in draft status, so we should not allow the menu item to be displayed for normal users and admin users can see the menu item. |
We just don't have to show a menu item. And hide it from the array of items can be on |
Menu entry has a URL. The URL can have alias. If the alias is exists - you can get Route by alias, if not - then get Route by URL. |
The menu should not render items that refer to non-public pages (Archive, private, draft) if I am not logged as administrator.
I have a page with status = private, linked to an menu item.
I see menu voice as anonymous user and can click it; so I receive a HTTP_Exception_404 [ 404 ]: Attempt to non-existent post.
The text was updated successfully, but these errors were encountered: