How to pass a simple state value through URL (before controller's name) ? |
[eluser]MeXHere[/eluser]
I want to pass a state value to use it to say when I should include one header/footer template or the other (so I can display and handle forms in a JS-popup style window without write separate code - cause I'll use a iframe in that popup). The code is already in place with "anchor", "form_open" etc. in my templates and controller code already written but I have the posibility to add something before the controller in the URL's. Because how the code is written, it's easy to add something like: (1) http://mysite.com/index.php/state_value/...on/field1/... instead of what's now: (2) http://mysite.com/index.php/some_control...on/field1/... Any ideea how can I somehow grab the "state_value", set it in a global variable .. and then show what's now accessible from the (2) URL ? (once I have the value I can form the (2) URL for all "anchor", "form_open" etc. just by changing a few lines of code).
[eluser]MeXHere[/eluser]
Oh, I got it working as expected with a route and parsing the $_SERVER[REQUEST_URI] to see if I have the requested value(s) in the URL. Thanx. |
Welcome Guest, Not a member yet? Register Sign In |