![]() |
Function? Not sure where to place a function used on every page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Function? Not sure where to place a function used on every page (/showthread.php?tid=24778) |
Function? Not sure where to place a function used on every page - El Forum - 11-19-2009 [eluser]JamieBarton[/eluser] Hi all, I have a sidebar view, at the moment it is just an html file. However, I would like to put some things in it which are dynamic. There are two things, which would need to require a model then feedback a variable I can use in a foreach inside of the Sidebar, this I know. What I don't know is where I should place this function? I'm thinking of a helper. What it does is query the db for a limit of 8 records for family members and i want to display them on the sidebar which is included in every page. I just don't know how the variables used inside of the sidebar will be known. Hoping someone can assist me with this. Regards, Jamie Function? Not sure where to place a function used on every page - El Forum - 11-19-2009 [eluser]jedd[/eluser] [quote author="Jamie B" date="1258667615"] Hi all, [/quote] Hi Jamie. You seem to be asking a very high proportion of frequently asked questions. I'd point you at the direction of the [url="/wiki/FAQ"]FAQ[/url] - it would be good for us if you familiarised yourself with the information that's already available. It's also covered in [url="/wiki/Header_and_Footer_and_Menu_on_every_page_-_jedd/"]this section[/url] of the wiki. Function? Not sure where to place a function used on every page - El Forum - 11-19-2009 [eluser]JamieBarton[/eluser] Thanks for your response, hopefully I'll be able to get the hang of that. |