[Zope] slicing absolute_url

Sir K k_hamzat@yahoo.com
Mon, 12 Aug 2002 08:52:50 -0700 (PDT)


--- Casey Duncan <casey@zope.com> wrote:
> Some suggestions:
> 
> Store the summary as metadata in the catalog. Just create a python
> script 
> named summary like:
> 
> return context(context, context.REQUEST)[:200]
> 
> When indexing a dtml doc this would render it and return the first 200 
> characters. A problem with this is that HTML in the documents would
> screw up 
> the page. You should strip it out.

I created the python script and referenced it as below. What it displays
is just the more statement without the summary.

<dtml-call "REQUEST.set('mm',
ZopeTime().toZone('GMT+1').strftime('%d%m%y'))">
<dtml-in "Zcat_New1_Dtml_doc(mm=id)">
<dtml-if "mm==id">
<dtml-var summary>
<a href="&dtml-absolute_url;"> more </a>
</dtml-if>
</dtml-in>


Thanks for the support.



=====
Hamzat kamaldeen Ishola Dnet Systems Limited. 223 Ikorodu Road, Lagos. Nigeria. 234 1 7749381, 234 08033011305 --- If Mistake is an opportunity to see better,&nbsp;then it is not a problem but readiness to admit it. Sentimental decisions are not mistakes but failures !!!&nbsp;

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com