[Zope-CMF] Newbie question CMF Document

shivprasad anantram sanantram@yahoo.com
Wed, 8 Aug 2001 06:47:25 -0700 (PDT)


Sorry I should have been more specific. Here's the
code, it is a modification of recent_news dtml method,
with a little modification. Everything else about the
Document like title, description prints out fine.

TIA
Shiv


<dtml-var standard_html_header>

<dtml-let
newsitems="portal_catalog.searchResults(meta_type='Document',
  sort_on='Date', sort_order='reverse',
review_state='published')">

<dtml-in newsitems size="10" start="batch_start"
previous>
 <p style="Desktop">
 <a
href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-start-number;">
 Next &dtml-previous-sequence-size; more recent
articles
 </a>
 </p>
</dtml-in>

<dtml-in newsitems size="10" start="batch_start">
 <dtml-if sequence-start>
 <table cellspacing="0" border="0" width="90%">
 </dtml-if>
 <tr>
  <td class="NewsListing" align="left" valign="top">
      <a href="&dtml-getURL;"> &dtml-title; </a>
   <br> By &dtml-Creator;
  </td>
  <td class="NewsListing" align="right" valign="top">
    <dtml-var Date>
  </td>
 </tr>
 <tr>
  <td colspan="2">
    <em> <dtml-var Description fmt="structured-text">
</em>
  </td>
 </tr>

<!-- VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV-->
<!-- I inserted Cooked Body here -->
<!-- VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV-->
<dtml-var CookedBody>
<!-- VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV-->
 <dtml-if sequence-end>
  </table>
 <dtml-else>
  <tr> <td> <br /> </td> </tr>
 </dtml-if>
<dtml-else>
 <p class="Desktop">
No articles have been published!
 </p>
</dtml-in>

<dtml-in newsitems size="10" start="batch_start"
next>
 <p class="Desktop">
 <a
href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-number;">
 Next &dtml-next-sequence-size; older articles
 </a>
 </p>
</dtml-in>

</dtml-let>

<dtml-var standard_html_footer>




--- Jon Edwards <jon@pcgs.freeserve.co.uk> wrote:
> > I am using portal_catalog.searchResults to fetch
> the
> > list of documents, could that be the problem.
> 
> You really need to give more details of your code,
> otherwise I'm just
> guessing wildly!
> 
> What code are you using to do the catalog search?
> Does it return any
> results - i.e. if you replace <dtml-var CookedBody>
> with <dtml-var title>,
> does it show a list of titles?
> 
> Does the search check whether the document is
> published -
> review_state='published' - and if so, have you
> published your documents?
> 
> HTH
> 
> Cheers, Jon
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/