Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions 5.4 - Determine URI segment of method
#6

[eluser]Aeisor[/eluser]
Thanks for your reply.

Essentially I want to be able to pass parameters through in key => value pairs, for example: /welcome/index/language/en-GB. The welcome controller is located at ./application/modules/welcome/controllers/welcome.php

In this instance I can use $this->uri->uri_to_assoc(3); and I'll get language => en-GB; However, if I used $this->uri->uri_to_assoc(3) on the URL /welcome/test/index/language/en-GB, where the controller is now ./application/modules/welcome/test/controllers/test.php, the key => value pairing is messed up.

So what I wanted to do was find the index of the method (in both cases, 'index', but the numeric index in the URI Segments changed) so that I could use that in $this->uri->uri_to_assoc(n) to get the correct key => value pairings.

In the first example, I would want something to return 2 (So I can +1 = 3). In the second example, I'd want it to return 3 (So I can +1 = 4)

Hope that makes sense?


Messages In This Thread
Modular Extensions 5.4 - Determine URI segment of method - by El Forum - 04-29-2013, 12:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB