I found a solution:
#set($blogentries=
$site.getWeblog('myblog').getRecentWeblogEntries('nil',5))
#foreach ($entrie in $blogentries)
$entrie.getDisplayContent()
#end
Dave Johnson-8 wrote:
>
> Try this:
>
> #set($pager = $site.getWeblogEntriesPager('nil', $since, $max))
>
> And this might also work with Roller 4:
> #set($pager = $site.getWeblogEntriesPager(null, $since, $max))
>
> - Dave
>
>
> On 9/24/07, Dudee <[EMAIL PROTECTED]> wrote:
>>
>> I've got the recent entries method to work now. I've choosed the
>> frontpage-theme and it worked. I thaught I could use the recent etries
>> method with any theme....
>>
>> But I do still have one question. How do i get the recent-entries method
>> to
>> work when I only want recent entries from a certain blog.
>>
>> In the guide is says:
>> Pager getWeblogEntriesPager(Weblog weblog, User user, int sinceDays, int
>> max)
>> Get pager that returns WeblogEntry objects from one specific weblog and
>> user. Will only return entries
>> created in last sinceDays number of days and never more than max items.
>>
>> But i've tried this and I get nothing. Heres what i've tried
>> #set ($since =90)
>> #set ($max =10)
>> #set($pager = $site.getWeblogEntriesPager('nameoftheblog',$since,$max))
>>
>>
>>
>> Dave Johnson-8 wrote:
>> >
>> > On 9/21/07, Dudee <[EMAIL PROTECTED]> wrote:
>> >> Does anybody know what the problem is?
>> >>
>> >> Dudee wrote:
>> >> >
>> >> > I can't get the site wide methods to work. I have checked the
>> "Enable
>> >> > aggregated site-wide frontpage" box. Here's what my code looks like.
>> >> >
>> >> > #set ($since =90)
>> >> > #set ($max =10)
>> >> > #set($pager = $site.getWeblogEntriesPager($since,$max))
>> >> > #showWeblogEntriesPager($pager)
>> >> >
>> >> > What am I missing?
>> >
>> > I don't see anything obviously wrong. With the default Roller config,
>> > the site model only works in a blog that is the front-page blog and
>> > that has aggregated front page turned on.
>> >
>> > Try just putting the word $site in your template somewhere. What do
>> > you see? If you just see the word $site in the generated output then
>> > you know the model is not present.
>> >
>> > - Dave
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/site-methods-not-working-tf4485672s12275.html#a12854938
>> Sent from the Roller - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/site-methods-not-working-tf4485672s12275.html#a12873769
Sent from the Roller - User mailing list archive at Nabble.com.