I have following situation:
1. i have a hidden field in a form in which I store referer (for me to
know where to return to)
2. after saving the form I want to add a parameter like highlight:3
(highlight item with id = 3).

Question: What is the best way to handle this problem?

Problems:
1. I often do not have whole url (when coming form index action the
url is only /controllername)
2. there are many different parameter types: named, pass, query
string, each of them should be accounted for

I've come to this solution (it is only partial but for now it works)

function parseUrl($url) {
        $url = Router::parse($url);
        $url = am($url, $url['named'], $url['pass']);
        unset($url['named']); unset($url['pass']);
        return $url;
}

The problem is not trivial, so all master chefs, please help...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to