Welcome Guest, Not a member yet? Register   Sign In
Pass dataMapper Object Value to VIEW
#1

[eluser]Unknown[/eluser]
Hi boys!
this dataMapper is Great!!! Smile

I have a little problem....It's possible to pass dataMapper to View?

Controller:

Code:
$user= new User();
        $user->select('login, password');
        $user->get();
        $data['users'] =  $user;
        $this->parser->parse('blog_view',$data);

View:

Code:
<html>
<head>
<title>{blog_title}</title>
</head>
<body>
    <h1>Welcome to Blog!</h1>
    
    <ul>
        {users}
            <h5>{login}</h5>
            <p>{password}</p>
        {/users}
    </ul>
&lt;/body&gt;
&lt;/html&gt;

THANK YOU!




Theme © iAndrew 2016 - Forum software by © MyBB