Welcome Guest, Not a member yet? Register   Sign In
Using CI for controlling page hierarchical elements based on URI
#1

[eluser]MEM[/eluser]
On my model, I have a method responsible for retrieving database data, grab that information and, return an hierarchical array.

On my controller, I have a method that accepts one parameter.
That parameter, will be filled by the URI third segment. Then, it will use that ID, pass it to the model method, and also, call a view.

On my view, I'm trying to build a list of links based on the information that has come from the model (trough the controller).
However, that list of links should be larger or shorter according to the URI changes.

I will need to use recursion, in order to display child elements of the array. However, I want this recursion to be activated only when the URI matches some values.
:exclaim:

The question is now more structural then practical:
Where should we deal with this conditional? Should we build it on our view? Or on our controller? Can anyone provide me some sketch example to kick me out of this mud?


Regards,
Márcio


Messages In This Thread
Using CI for controlling page hierarchical elements based on URI - by El Forum - 09-08-2009, 06:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB