The usual tight deadline on a project - Advice would be appreciated |
[eluser]Unknown[/eluser]
Hi, I've done the usual trick of biting off more than I can chew. I need to produce a database driven website on Code Igniter for 1st Jan launch. Now I've been doing tutorials and such, and understand how to cover most of the development bases but there's one thing I'm not sure about how to approach. This is the premise: * The site lists multiple types of events/locations across multiple sections using maps etc * Sponsors have their own branded (e.g. their logo and blue) version of the site which is called via a specific url Now the sponsors bit I'm unsure of how to handle. The premise would be to have a url structure like the following: Code: /2/ - Homepage So the 2 in this case is the ID of the sponsor Joe Bloggs. So /3/ would load the sponsor styling of Jim Bloggs. It may be a simple question for someone in the know, but should I approach this? Any help is really appreciated. Thanks Michael
[eluser]CroNiX[/eluser]
You can do that with routes. An example would be: Code: //If there is a number in first segment, "restaurants" in 2nd segment and a number in 3rd segment, pass the first and 2nd number to this controller/method for the individual view Then in your_controller: Code: function your_single_view_method($sponsor_id = 0, $restaraunt_id = 0) //This is $1 and $2 from the route
[eluser]Unknown[/eluser]
Hi CroNiX Many thanks for the quick reply. This is exactly what I was looking for. Now is the time to try and implement everything in double quick time ![]() Thumbs up for this community, hopefully I'll be able to reach a level where I can help out to. Thanks |
Welcome Guest, Not a member yet? Register Sign In |