On 9/17/2010 1:16 PM, Thomas Schrader wrote:
Ok, I understand now a little bit better how this works. I removed the context so i 
simply call $theme->content($post); in the foreach loop. But this doesn't solve the 
problem, it still display the same post five times. Is it possible that there is an 
issue with reassigning the post in the $theme->content() method? var_dump($posts) 
shows, that $posts contains the 5 Posts that should be displayed. The output directly in 
the foreach loop also works pretty fine, but if I use $theme->content() it doesn't 
work.

I attached the output of vardump.


Ok, I have a new thought on the problem:
What does your entry.php template look like?

When you use $theme->content() the thing that is passed to render becomes $content in the output template.

So if you call:

$theme->content($post);

Then in your entry.php template, to output the title, you need:

<?php echo $content->title_out; ?>

There's no (easy) way for the theme system to know the name of the variable you passed to ->content() and so it puts that value into $content when it calls the template.

If you change $post to $content in your entry.php, I think that could correct your issue.

Owen

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/habari-users

Reply via email to