On Mon, Sep 22, 2008 at 05:52:22PM -0700, benmillett wrote:
> 
> I've tried implementing the asides function as described on the wiki
> ( http://wiki.habariproject.org/en/Asides ).  Instead of the tag
> 'aside', I'm using 'moviereview'.  With the theme I am using, I have a
> top bar that loads before the entries content, with the php call
> placed after the <body> tag within header.php.  On the site home page,
> all entries show as expected.  When individual entries are viewed on
> single pages, the previous/next links and entry title and content of
> the expected entry are replaced by the title and content of the oldest
> entry with the tag 'moviereview' with the previous/next relative to
> the 'moviereview' entry.  Using the mzingi theme, I moved the 'asides'
> code from sidebar.php up to the header.php and got the same result,
> suggesting that it is not limited to these two themes.  I also tried
> to adapt the entry.single.php to include foreach ($posts as $post) to
> try to get it back to the expected entry, but that didn't work
> (nothing loaded between the start and end of the foreach).  I also
> tried to zero out the $this variable after the 'moviereview' foreach
> stretch, hoping to get it to reset, but that resulted in a php error.
> Is this trac ticket worthy?  Or am I just missing something?

It sounds like you might be reusing a variable from a loop.

foreach ($reviews as $post) { 
  // do stuff here to each review
}

echo $post->title // oops! $post now refers to the last review!

If that's the case, rename the variable in the loop, $reviews as
$review.

Hope that makes sense.


-- 
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

--~--~---------~--~----~------------~-------~--~----~
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