Thanks again for the clarification and advice.
-David

-----Original Message-----
From: Dave [mailto:snoopd...@gmail.com] 
Sent: Wednesday, January 06, 2010 7:58 AM
To: user@roller.apache.org
Subject: Re: preview or template question

Yes, I would recommend turning off pagers.

You are correct in saying that getRecentWeblogEntries() does not
return draft entries (not a bug) and that preview does not show all
elements of the page perfectly (I'd call that a bug).

- Dave


On Mon, Jan 4, 2010 at 11:21 AM, Williams, David A.
<david.willi...@uspto.gov> wrote:
> Dave,
>        Thanks for the reply; I hope you had a great holiday break.  When I 
> use the following in the weblog template, the published look matches the look 
> from two pagers; however, preview does not show the new entry at all.  I'm 
> guessing getRecentWeblogEntries() returns only those which are published.
> <h2 class="section-title">Current Status</h2>
>        #set($entries = $model.weblog.getRecentWeblogEntries("Current Status", 
> 1))
>        #if(!$entries.isEmpty)
>             #set($day = $entries.get(0).pubTime)
>        #end
>        #includeTemplate($model.weblog, "_day")
>
> <h2 class="section-title">Planned Events</h2>
>        #set($entries = $model.weblog.getRecentWeblogEntries("Planned Events", 
> 1))
>        #if(!$entries.isEmpty)
>             #set($day = $entries.get(0).pubTime)
>        #end
>        #includeTemplate($model.weblog, "_day")
>
>        Should I go ahead with that change to remove any possible problems 
> with having two pagers and then look at other options for making preview work?
>        Once again, thanks for your help.
>        -David
>
> -----Original Message-----
> From: Dave [mailto:snoopd...@gmail.com]
> Sent: Thursday, December 24, 2009 9:39 AM
> To: user@roller.apache.org
> Subject: Re: preview or template question
>
> A pager is really designed to be used alone on a page without other
> pagers. If you use two pagers on a page, they may interfere with each
> other.
>
> In your case I would recommend using the Weblog's
> getRecentWeblogEntries() method instead, it returns a simple list of
> Weblog entries that you can display with a #foreach loop.
>
>   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).
>
> - Dave
>
>
> On Mon, Dec 14, 2009 at 12:01 PM, Williams, David A.
> <david.willi...@uspto.gov> wrote:
>> Hi,
>>        We're setting up a roller blog for operating status; we have two 
>> flavors: current and planned.  I have defined the two as categories, changed 
>> the settings to display only one entry on the main page and added this in 
>> the template to show one current and one planned entry:
>>
>> <h2 class="section-title">Current Status</h2>
>>        ## show next/previous paging controls
>>        #set($current_status = $model.getWeblogEntriesPager("Current Status"))
>>        ## show entries
>>        #showWeblogEntriesPager($current_status)
>>
>>
>> <h2 class="section-title">Planned Events</h2>
>>        ## show next/previous paging controls
>>        #set($planned_events = $model.getWeblogEntriesPager("Planned Events"))
>>        ## show entries
>>        #showWeblogEntriesPager($planned_events)
>>
>>        This is working just fine; however, when Full Preview is selected by 
>> an author, the entry to be previewed appears under both headings (Current 
>> and Planned).
>>        Is there a better approach for what I'm trying?  Is there a simple 
>> way to make preview match my expectation (the entry being previewed appears 
>> under the correct heading with either the current entry for the other 
>> category or no entry for the other category)?
>>        Thanks for any pointers anyone can offer,
>>        -David
>>
>> --------------
>> David Williams
>> IT Specialist
>> Information Management Services
>> U.S. Patent & Trademark Office
>> Madison West, 4D35
>> Alexandria, VA 22314
>> 1-571-272-3877
>> david.willi...@uspto.gov
>>
>>
>>
>
>

Reply via email to