roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: Problem with $site.getWeblogEntriesPager
Date Wed, 29 Apr 2009 21:16:45 GMT
I think the problem is that two pagers do not work well on one page
together because both show the page indicated by the request parameter
"page." That's a problem because when you're on page 5 of the blog it
doesn't mean you are on page 5 of the sidebar listing of
most-commented-entries.

You could solve this by fetching the data for the
most-commented-entries list from Roller, then using JavaScript or an
iframe to display them in the sidebar of your page. The iframe idea is
the easiest for me to explain. You create a simple page template with
the $site.getMostCommented...() call and just enough HTML and to
display the comments. Then you use a borderless iframe to display it
in the sidebar of your page:

   <iframe src="http://cgis.jpost.com/Blogs/otherview/pages/mostcommented.html"
       frameborder="0" />

That way, the most-commented pager won't see the page request parameter at all.

- Dave



On Tue, Apr 28, 2009 at 11:33 AM, Odelya YomTov <odelya@jpost.com> wrote:
> I have this blog:
>
> http://cgis.jpost.com/Blogs/otherview/
>
> I display in the right column Most Popular box that displays the most 7
> commented posts.
> The problem is that on the first page of a blog, it works fine, but from the
> second page it doesn't work!!
>
> http://cgis.jpost.com/Blogs/otherview/?page=1
>
> the code is:
> #set ($theEntries = $site.getMostCommentedWeblogEntries(null,7,5))
> #if ($theEntries.size() > 0)
>   #set ($entriesLast10Days = $site.getWeblogEntriesPager(7,100))
>   #set ($entriesLast10DaysItems = $entriesLast10Days.getItems())
> ...
> ...
> #end
>
> $site.getWeblogEntriesPager from the second page returns no items! It's very
> weired..
>
> Why is it?
>
> Odelya
>
>
>

Mime
View raw message