[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[phpGroupWare-developers] Proposal for new menu system for phpGW
From: |
Dave Hall |
Subject: |
[phpGroupWare-developers] Proposal for new menu system for phpGW |
Date: |
Wed, 12 Dec 2007 00:29:23 +1100 |
Hi all,
It has been clear to me a for a while that the current hook_sidebox,
hook_admin and hook_preferences is inadequate for phpGW now.
I think we should move to a more generic menu system, which can be used
in different ways across phpGW, for example, idots could keep its
"sidebox menu", while another template set may implement a preferences
menu on each page. It should also be possible to merge the folders
application functionality into any change.
The new system should use the method based hooks system.
The hook would be called with no arguments.
The hook method should return the following data
array
(
'admin' => array
(
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above - optional>)
),
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above>)
)
),
'preferences' => array
(
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above - optional>)
),
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above>)
)
),
'application' => array
(
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above - optional>)
),
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above>)
)
),
'folders' => array
(
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above - optional>)
),
array
(
'url' => <link>,
'text' => <text for link>,
'title' => <optional hover
text>,
'img' => <optional icon for
item - may not be implemented by all templates>',
'children' => array(<child
nodes same structure as above>)
)
)
);
All images must be relative to phpgw root
All menus are optional for each application.
The menu will be cached for user's session. A trigger should be created
to clear the cache when certain events happen, such as changing ACLs,
adding/removing cats etc.
I think this gives us the flexibility we need.
Discuss :)
Cheers
Dave
--
LLLLL
L*LLL
LLLLL
LLLLL DAVE
LLLLL HALL
CONSULTING
Open Source
Business Solutions
p +61 410 47 42 55
e address@hidden
w davehall.com.au
f +61 3 8610 0029
- [phpGroupWare-developers] Proposal for new menu system for phpGW,
Dave Hall <=