Welcome Guest, Not a member yet? Register   Sign In
Your Opinion on my view library
#6

[eluser]jake73[/eluser]
I have another idea :

Put my title and my meta in the content view. :

Ex : view page1
Code:
<?php
$data['title'] = "Something " . $data['field'];
$data['description'] = "Description " . $data['field'];
$data['keywords'] = $data['field1'].", " . $data['field2'];
?>
Content of page1

And in the view theme :

Code:
<?php
$content = $this->load->view('page1',$data,true);
?>
<head>
<title><?php echo $title;?></title>
<meta name="keywords" content="<?php echo $keywords;?>" />
<meta name="description" content="<?php echo $description;?>" />
</head>
<div id="content">
&lt;?php echo $content ;?&gt;
</div>
&lt;/body&gt;
&lt;/html&gt;

But i think i can't access to $data in the content view ?

And how i can replace 'page1' of $content = $this->load->view('page1',$data,true);
with the name of the controller function ?


Messages In This Thread
Your Opinion on my view library - by El Forum - 04-23-2008, 07:14 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:21 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:39 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:17 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:51 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:31 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB