How to classify in the good categories? |
[eluser]gRoberts[/eluser]
Ok, that's semi-good. What I would do now, is instead of using the column from each row to populate the category name, go back to using the {c_values} as you did before, but within your {values} loop, you should then use an if statement to filter out those rows that do not match the {c_id} of the {c_values} category. i.e. Code: <tbody>
[eluser]Amalgame[/eluser]
The result with filtering! Quote:{if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif} {if c_id == h_id} {/endif}
[eluser]gRoberts[/eluser]
You should really only need to check that the current row in {values} has the same category id as the current {c_values} row.
[eluser]Amalgame[/eluser]
Okay, I admit that even by reading the code, I can not find how to fix it... Thank you for your help gRoberts
[eluser]gRoberts[/eluser]
Without really playing with your code, it's hard to play. Using normal PHP, it should be as simple as: Code: <tbody> This is assuming you have a column in the `ids` table for your category.
[eluser]Amalgame[/eluser]
gRoberts you're wonderful! It's run! Quote:IP CIDR Hostname Login Password Type Services OS Version Status Note Thank you very much! Now I see why it does not work with the template parser library, but if it works with your method, it's perfect Thank you again!
[eluser]gRoberts[/eluser]
Glad to be of service. I've never used the template parsing side of CI, as I find PHP's code a lot cleaner and when looking from the outside, as a developer, I'd probably freak trying to work out what's happening where. Could be worth looking into using PHP instead. You have a lot more flexibility and they both work together if I recall correctly.
[eluser]Amalgame[/eluser]
I am a former developer of MODs for phpBB on this bulletin board there is the same with the template parser library and I found it clean because there is no PHP code in HTML pages! It is best to keep the old methods when you do not know completely a framework Anyway I'm happy to use CI as it is very light and very strong I think! |
Welcome Guest, Not a member yet? Register Sign In |