Welcome Guest, Not a member yet? Register   Sign In
Need Help with Views
#2

[eluser]techgnome[/eluser]
I'd get the stored content from inside the controller... pass it to the view. Same with the ads.

At least that's how I usually write my controllers:
1) Get all the data
2) Perform additional logic
3) If necessary, get more data
4) Pass everything to the view

In the View I:
1) Load the head template
2) Load the page banner template
3) Load left side
4) Load main content based on $view_content passed from the controller
5) Load the right view (unless it's a wide view)
6) Load the footer

In your case as for the ads, you may not care about the types of ads or the ads themselves, but you should be able to retrieve them based on the view you want to display, and then simply pass along the results to the view when you load it.

Or have I over simplified it?

-tg


Messages In This Thread
Need Help with Views - by El Forum - 10-11-2010, 07:56 AM
Need Help with Views - by El Forum - 10-11-2010, 11:13 AM
Need Help with Views - by El Forum - 10-11-2010, 02:06 PM
Need Help with Views - by El Forum - 10-11-2010, 08:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB