Welcome Guest, Not a member yet? Register   Sign In
base_url() not being parsed (from HTML stored in SQL database)

Well, in this specific example, you could also print in the plain text for the base_url. ie, interpret your php before you stick it into the database.

I personally try to break my controllers out by logical function. There's no need to do one per page, but you can definitely have a quiz controller, a blog controller etc.

Another good option is creative view template usage. For example you could store the following in the db: name, desc, body, image1, image2, image3, view_ID. And you can display the information differently depending on which view you push it to.

Try and avoid the extremes of having a controller for each page, but also avoid the extreme of storing everything in the database and routing it all through one controller... if you're doing that then you are storing your application logic in the database instead of in the controllers like its supposed to... and don't even mention when you decide to redesign all of your pages.

(if you want your database to own your soul then go try drupal... shudder, then you will come back to codeigniter and happily write a new controller for each type of content you want to control and display).

Messages In This Thread
base_url() not being parsed (from HTML stored in SQL database) - by El Forum - 09-01-2010, 11:08 PM

Theme © iAndrew 2016 - Forum software by © MyBB