[v2.0] Admin navigation

Showing 1-9 of 9 messages
[v2.0] Admin navigation Fahad Ibnay Heylaal 10/10/11 3:15 PM
Admin navigation can be managed by a static class. Plugin elements won't be necessary any more then.

Let's say, there is a class called CroogoNav. From our Example plugin's bootstrap, we can do this:

// bootstrap
CroogoNav::add('content', array(
    'title' => 'Content'
    'link' => '#',
    'weight' => 5, // for ordering
    'access' => array('admin', 'role1', 'role2'),
    'children' => array(),
));

// If we wanted to inject a new link UNDER Content link:
CroogoNav::add('content.children.new_link_alias', array(
    'title' => 'Link under Content',
    'link' => '#',
    'weight' => 10,
    'access' => array('admin'),
    'children' => array(),
));
 
Notice the first argument of the method. As long as we maintain a valid dot separated path, we can utilize Set class to do the magic. And can generate an unordered list from the layout when required.

--
Fahad Ibnay Heylaal
http://fahad19.com
Re: [v2.0] Admin navigation Rachman Chavik 10/10/11 5:18 PM
Fahad,
  • What would be the format of the 'link' parameter? Router::url() compatible ?
  • To avoid having too many things chucked into config/plugin_bootstrap.php, I'd suggest to have menu configuration in a separate config, eg: config/admin_menu.php.
  • For the first parameter, I understand that we could go for unlimited number of children? ie:
    CroogoNav::add('content.children.new_link_alias.children.third_level.children.fourth_level', array(....));
Awesome!

Regards,
Re: Admin navigation John 10/10/11 8:10 PM
If these menus were created in a model would be easily organized using
the tree behavior, see example book.cakephp.org/view/1339/Tree, after
save add in cache by 6 months (or until receive new changes)


This CroogoNav is very like that WordPress menu class, very flexible.




On 10 out, 20:18, Rachman Chavik <rcha...@gmail.com> wrote:
> Fahad,
>
>    - What would be the format of the 'link' parameter? Router::url()
>    compatible ?
>    - To avoid having too many things chucked into
>    config/plugin_bootstrap.php, I'd suggest to have menu configuration in a
>    separate config, eg: config/admin_menu.php.
>    - For the first parameter, I understand that we could go for unlimited
Re: Admin navigation Stefano Zoffoli 10/11/11 1:56 AM
I like it!

--
Dott. Stefano Zoffoli
Web Development & Internet Technologies

Librasoft Snc
http://www.librasoftsnc.it
Via della Luna, 13
47034 Forlimpopoli (FC)
Tel. +39 0543 424612
Fax +39 0543 424612


2011/10/11 John <hostde...@vibemidia.com>
>    array(....));
>
> Awesome!
>
> Regards,

--
You received this message because you are subscribed to the Croogo mailing list.
To post to this group, send email to cro...@googlegroups.com
To unsubscribe from this group, send email to
croogo+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/croogo?hl=en
Visit the official website at http://www.croogo.org

Re: [v2.0] Admin navigation Fahad Ibnay Heylaal 10/11/11 5:32 AM
On Tue, Oct 11, 2011 at 1:18 AM, Rachman Chavik <rch...@gmail.com> wrote:
Fahad,
  • What would be the format of the 'link' parameter? Router::url() compatible ?
Likely 
  • To avoid having too many things chucked into config/plugin_bootstrap.php, I'd suggest to have menu configuration in a separate config, eg: config/admin_menu.php.
You can always include() a file from bootstrap if you wish to keep things separate.
  • For the first parameter, I understand that we could go for unlimited number of children? ie:
    CroogoNav::add('content.children.new_link_alias.children.third_level.children.fourth_level', array(....)); 
Yes, unlimited. And inject anywhere.
 
Awesome!

Regards,

--
You received this message because you are subscribed to the Croogo mailing list.
To post to this group, send email to cro...@googlegroups.com
To unsubscribe from this group, send email to
croogo+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/croogo?hl=en
Visit the official website at http://www.croogo.org

Re: Admin navigation Fahad Ibnay Heylaal 10/11/11 5:41 AM
Involvement of database and models is not needed for admin navigation. Ordering can be maintained by the 'weight' key of links.

--
Fahad Ibnay Heylaal
http://fahad19.com


>    array(....));
>
> Awesome!
>
> Regards,

--
You received this message because you are subscribed to the Croogo mailing list.
To post to this group, send email to cro...@googlegroups.com
To unsubscribe from this group, send email to
croogo+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/croogo?hl=en
Visit the official website at http://www.croogo.org

Re: Admin navigation John 10/14/11 4:16 AM
@ FAHAD
ohh, had not understood before. +1



On 11 out, 08:41, Fahad Ibnay Heylaal <faha...@gmail.com> wrote:
> Involvement of database and models is not needed for admin navigation.
> Ordering can be maintained by the 'weight' key of links.
>
> --
> Fahad Ibnay Heylaalhttp://fahad19.com
Re: [v2.0] Admin navigation Rachman Chavik 11/21/11 5:54 AM
Hi guys,

FYI, I'm working on this item now on the 1.4 branch.  I will post more when it looks better.

It should be easily rebased for 2.0 later.
Re: [v2.0] Admin navigation Rachman Chavik 11/21/11 9:12 PM
On Monday, November 21, 2011 8:54:51 PM UTC+7, Rachman Chavik wrote:
Hi guys,

FYI, I'm working on this item now on the 1.4 branch.  I will post more when it looks better.