[Zope] UPDATE: Problems calling directory
Adrian Madrid
aem@byu.edu
Thu, 19 Apr 2001 23:20:29 -0700 (PDT)
--- Ben Peter <Ben.Peter@t-online.de> wrote:
> Adrian,
>
> > Although it sounds right I have tried and I sitll
> get
> > KeyError : name not found or allowed.
> ...
> That sounds much like the Portal.Publications.Review
> cannot be properly acquired from where your
> dtml-with snipplet is called. Could you go a bit
> into detail with your folder structure?
Root
+- Portal (CMF Site)
| +- Members (Folder)
| | +- aem (Folder)
| | +- ArticleX (CMF Article)
| +- Publications (Folder)
| | +- Review (Folder)
| | | +- Vol22 (Folder)
As you can see I working on a CMF site the is giving
me headaches. ArticleX is a customized content that
has a 'location' property with the directory where it
should show up (ie. 'Publications/Review/Vol22').
In the standard_html_header I call a dtml method
(breadcrumbs) where I want to get the fake PARENTS
(the lineage of where it should show). Here follows
some of the code I was working on:
<dtml-if location>
<p>Location: &dtml-location;
<dtml-let transtab="_.string.maketrans('/', '.')"
location2="'Portal.'+_.string.translate(location,
transtab)">
<p>Location2: &dtml-location2;
<p>Works:</p>
<dtml-with "Portal.Publications.Review.Vol22">
<p>This is the <dtml-var document_id> Document
in the <dtml-var title_and_id> Folder.</p>
</dtml-with>
<p>Does not:</p>
<dtml-with "_.getitem(_.getitem('location2'))">
<p>This is the <dtml-var document_id> Document
in the <dtml-var title_and_id> Folder.</p>
</dtml-with>
</dtml-let>
</dtml-if>
I don't know if there is something in the CMF that
breaks the logic and I will try that tomorrow. If you
see anything that I can try, please let me know.
Thanks again for your help,
=====
---------------------------
Adrian Esteban Madrid
Benson Institute, Webmaster
Brigham Young University
---------------------------
adrian_esteban@madrid.com
===========================
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/