Again, from the Template Guide... $model.weblogCategory give you the Weblog selected by the current request.
So $model.weblog.getRecentWeblogEntries($model.weblogCategory.path, 5) should get you the most recent 5 entries in that category. - Dave On Wed, Nov 18, 2009 at 10:35 AM, Ana Mercedes Pardo <[email protected]> wrote: > Is there a way that i could get the weblogs entries specifying the category > as the one that has been selected. For example if the user just clicked on > the Music category i want to tell the getRecentWeblogEntries to display the > category that has been click. > > Thanks. > > > 2009/11/18 Dave <[email protected]> > >> There is a method in the weblog object that get the most recent >> entries in a weblog category: >> >> List getRecentWeblogEntries(String cat, int max) >> Get most recent WeblogEntries in the weblog up to the number max. >> You can specify a category name if you'd liike only entries from >> one category (or “nil” for all categories). >> >> There is also one in the model object that does the same, but with a pager: >> >> Pager getWeblogEntriesPager(String catPath) >> Returns a pager that contains only entries from the specified category. >> >> If your weblog is the Front Page weblog and Aggregated front page >> weblog is enabled, then those method will return entries from all >> weblogs in the system. >> >> Please refer to the Template Guide for more info/examples. >> >> - Dave >> >> >> >> On Mon, Nov 2, 2009 at 11:39 PM, Ross Shaw <[email protected]> wrote: >> > >> > Hi, >> > >> > I'd like to tweak the homepage of my roller blog (version 4.01) so it >> shows >> > the most recent post from a category called 'features' at the top of the >> > page, and then the latest posts from all other categories below it. I'm >> not >> > using the 'frontpage' theme, so the 'pinned to main' function doesn't >> work. >> > >> > Any thoughts on how to do this? Here is the relevant part of my existing >> > weblog template if it helps. >> > >> > <div class="content"> >> > >> > ## show next/previous paging controls >> > #set($pager = $model.getWeblogEntriesPager()) >> > <div class="next-previous"> >> > #showNextPrevEntriesControl($pager) >> > </div> >> > >> > ## show entries >> > #showWeblogEntriesPager($pager) >> > >> > </div> >> > >> > thanks, >> > >> > Ross >> > >> > >> > -- >> > View this message in context: >> http://old.nabble.com/Homepage-template-customisation-tp26159966s12275p26159966.html >> > Sent from the Roller - User mailing list archive at Nabble.com. >> > >> > >> >
