How to transfer $data['query'] to Dwoo ?

#5
[eluser]sigork[/eluser]
I took ready examples but sorry, I cannot connect them:

Controller from http://ellislab.com/codeigniter/user-gui...arser.html

Code:
function index()
    {
$data = array(
              'blog_title'   => 'My Blog Title',
              'blog_heading' => 'My Blog Heading',
              'blog_entries' => array(
                                      array('title' => 'Title 1', 'body' => 'Body 1'),
                                      array('title' => 'Title 2', 'body' => 'Body 2'),
                                      array('title' => 'Title 3', 'body' => 'Body 3'),
                                      array('title' => 'Title 4', 'body' => 'Body 4'),
                                      array('title' => 'Title 5', 'body' => 'Body 5')
                                      )
            );

        $this->parser->parse(THEMEDIR.'test_view', $data);
    }

View from http://wiki.dwoo.org/index.php/Syntax#Blocks

Code:
<head>
<title>{$blog_title}</title>
</head>
<body>

<h3>{$blog_heading}</h3>

{foreach $blog_entries title body}
<h5>{$title}</h5>
<p>{$body}</p>
{/foreach}
And I get:
Quote:My Blog Heading

0

Array

1

Array

2

Array

3

Array

4

Array

Smth is wrong, I don't know what Sad

EDIT

I think I found the solution:

Code:
{loop $blog_entries title body}
<h5>{$title}</h5>
<p>{$body}</p>
{/loop


Messages In This Thread
How to transfer $data['query'] to Dwoo ? - by El Forum - 11-30-2009, 08:25 AM
How to transfer $data['query'] to Dwoo ? - by El Forum - 11-30-2009, 08:58 AM
How to transfer $data['query'] to Dwoo ? - by El Forum - 01-10-2010, 08:42 AM
How to transfer $data['query'] to Dwoo ? - by El Forum - 01-10-2010, 08:47 AM
How to transfer $data['query'] to Dwoo ? - by El Forum - 01-10-2010, 10:32 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.