Welcome Guest, Not a member yet? Register   Sign In
Newbie Object/Array View question
#1

[eluser]jpwdesigns[/eluser]
I've created a view for my header which controls the meta tags based on data the controler passes in as an object. It works fine.
Code:
<title>
<?=$page->meta_title?>
</title>
<meta name="keywords" content="<?=$page->meta_keywords?>" />
<meta name="description" content="<?=$page->meta_description?>" />
The problem is that I also want to use this header for other controlers such as Tank Auth's auth.php controler. However, in this case I want to hard code the objects and use the same header loaded before the tank auth login_form view. Example:
Code:
$data['page']['meta_title'] = "PLEASE LOGIN |".$this->config->item('website_name', 'tank_auth');
            $data['page']['meta_keywords'] = "password protected";
            $data['page']['meta_description'] = "This page is password protected.";
            $this->load->view('site_view_header', $data);
            $this->load->view('auth/login_form', $data);
//etc....

This of course isn't working but I cant figure out how to do this correctly. I keep getting this error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: views/site_view_header.php

Line Number: 8

" />

Thoughts?


Messages In This Thread
Newbie Object/Array View question - by El Forum - 12-09-2010, 02:56 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:03 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:17 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:23 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:38 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:43 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 03:51 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 04:03 PM
Newbie Object/Array View question - by El Forum - 12-09-2010, 04:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB