Second part of my question = 'There is an extra problem, each link in
every menu
requires arguments (like /user/view/32)'.
Our site is going to allow registered users to build profiles. These
profiles will be muilt-paged. We are using a navigation menu to take
people to different pages inside of the profile. So each link must
maintain the user id of the user who owns the profile in view.
Currently, we have a massive switch stmt that takes a string condition
(the name of the menu). The switch is inside of a component function
function getNavigationMenuItems($strMenuName, $strParams)
{
switch ($strMenuName)
{
.
.
.
case('View User Profile')
{
return array('link 1 title' => "url 1/$strParams", 'link 2 title'
=> "url 2/$strParams",...);
}
}
}
The controller passes the returned array to the layout.
I refuse to believe that this is the best way to do this. I am
currently creating a similar solution that will use DB backend.
However, this solution still seems too heavy wieght just for a nav
menu.
BONUS -- I am also looking for a way to make the navigation menu smart
so that it is aware of the content that its links are pointing at. So
lets say that a user hasn't filled in a page of his/her profile. The
nav link to this page should be displayed differently than the rest of
the links.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---