Welcome Guest, Not a member yet? Register   Sign In
Function? Not sure where to place a function used on every page
#1

[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
#2

[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.
#3

[eluser]JamieBarton[/eluser]
Thanks for your response, hopefully I'll be able to get the hang of that.




Theme © iAndrew 2016 - Forum software by © MyBB