Welcome Guest, Not a member yet? Register   Sign In
News and statistics in the left column
#15

[eluser]crumpet[/eluser]
you will need to change all your $data vars to $this->data

if there is no $this in front of a variable then it is only registered in the namespace of hte function not hte whole class
you need $this to share it between class functions
Also unless your header and footer are always changing you should set them in the same function as news so you don't have to set them everytime
otherwise your controllers will get cluttered with writing the same code over and over again.

remember the constructor of SiteController runs before the functions so you can always change thigns later
you can just set default values for your templating variables there so you don't have to write as much code


Messages In This Thread
News and statistics in the left column - by El Forum - 12-06-2008, 10:58 AM
News and statistics in the left column - by El Forum - 12-06-2008, 11:57 AM
News and statistics in the left column - by El Forum - 12-06-2008, 12:03 PM
News and statistics in the left column - by El Forum - 12-06-2008, 02:09 PM
News and statistics in the left column - by El Forum - 12-08-2008, 08:53 AM
News and statistics in the left column - by El Forum - 12-08-2008, 09:09 AM
News and statistics in the left column - by El Forum - 12-08-2008, 09:56 AM
News and statistics in the left column - by El Forum - 12-08-2008, 12:45 PM
News and statistics in the left column - by El Forum - 12-08-2008, 12:47 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:11 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:25 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:31 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:38 PM
News and statistics in the left column - by El Forum - 12-09-2008, 05:26 AM
News and statistics in the left column - by El Forum - 12-09-2008, 10:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB