Welcome Guest, Not a member yet? Register   Sign In
Question about the template parser
#3

[eluser]victorche[/eluser]
Thanks, markup2go ...
Anyway the first option is not for me ... I am using the template parser, so in my views I have:
Code:
{post_entries}
<h3>{post_date}: {post_title}</h3>
<p>{post_body}</p>
{/post_entries}
And in my controller I have:
Code:
$query = $this->db->query(SELECT * FROM posts);

$data = array(
              'post_entries' => $query->result_array()
            );

$this->parser->parse('blog_tpl', $data);
So, you're right... maybe I have to make it in the query I think. Is this the right solution or not?


Messages In This Thread
Question about the template parser - by El Forum - 07-10-2010, 12:30 AM
Question about the template parser - by El Forum - 07-10-2010, 03:15 AM
Question about the template parser - by El Forum - 07-10-2010, 03:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB