Welcome Guest, Not a member yet? Register   Sign In
Question
#1

[eluser]Bl4cKWid0w[/eluser]
I have a question that is kind of hard to explain, but I'll do the best I can. I am trying to make a gaming article application. Users click on links to a list of articles but only articles found in a certain console. On the main articles page (url is $base/articles) is a list of the consoles. My question is, how do I make it so that I don't have to make a function on my articles controller for every console available?
#2

[eluser]Bramme[/eluser]
I presume your articles are stored in a database and that each article has an id or whatever indicating what console they're about. So the easiest thing to do would be:
-make a method that get's a third argument: the console type
-query the database for all rows where console type = the third argument




Theme © iAndrew 2016 - Forum software by © MyBB