[Zope] slicing absolute_url

Sir K k_hamzat@yahoo.com
Fri, 9 Aug 2002 11:30:03 -0700 (PDT)


> What is it you are trying to slice out of the URL, the name of the
> parent or 
> something? Quite frankly the concept you have presented scares me ;^)
> There 
> is likely a better way that doesn't involve slicing the URL.
> 
> Please let us know what you are trying to do (rather than just throw
> broken 
> code at us) and maybe we can help you better.
> 
> -Casey

Thanks Casey,

I made silly mistake by making start > end. I feel sorry for myself !

Anyway what I was trying to do is this;
I have a DTML Method that search a Zcatalog to return all the Dtml Docs
with id matching var mm. I was able to display the absolute_url of these
Docs without any stress. Then there is need for me to get some of the Docs
and display at least some paragraphs b4 pointing the absolute_url to the
their details.These docs are inside subfolders which are in the same level
as the DTML Method.

So, what i was using the slicing for is to extract each subfolders name
from absolute_url so that i can be able to point to them and call the
particular DTML Doc.

This is the code;

<dtml-call "REQUEST.set('mm',
ZopeTime().toZone('GMT+1').strftime('%d%m%y'))">

<dtml-in "Zcat_Index_Dtml_doc(mm=id)">
<dtml-if "mm==id">
<dtml-let article=absolute_url>
<dtml-with "article[49:57]">
<dtml-var expr="_.getitem(mm,1)[0:400]">...<br>
<a href="&dtml-absolute_url;"> more </a>
</dtml-with>
</dtml-let>
</dtml-if>
</dtml-in>

Even with this I am still having ;
Error Type: KeyError
Error Value: 090802

But anytime I change <dtml-with "article[49:57]"> to 
<dtml-with "article1"> which is one the subfolders' name

It displays only the DTML Doc 090802 in the article1 folder.

I will be looking forward to your help.

Thanks once again.


=====
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