[eluser]martynrlee[/eluser]
Hi Guys,
Just wondering if anyone can help me...
I currently have a db with various page data stored such as contact details, page descriptions, introductions, headings etc.
I pull out the details from the model, depending on the function in the site controller. So for example, function about{} would pull in any details that match that page.
All works well but the contact details feature on all pages and they are also updated fairly often so they need to be dynamic. I know I could pull in the data from the db within every function in the controllers but just seems like there would be a way to just perform this function once and pull in to every page automatically. So I guess global variables but from a db.
I looked around and some people suggest using the config file but no mention of accessing a db from within the config file. Even if I could just pull the data in once at the top of the controller and send to all the views that seems logical but this doesn't seem to work.
Can anyone point me in the right direction? All help most appreciated.
Martyn.