Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Phil Harris

untested

dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10  start=qs
sort=sort_key

/untested

???


- Original Message -
From: "Jean Jordaan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: "RC Compaan (E-mail)" [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 2:52 PM
Subject: [Zope] dtml-let .. method /dtml-let


 Hi all

 The answer to my previous question makes this one occur to
 me: if dtml-var id in a method refers to the containing
 document's id, does 'myMethod' get to see 'myVariable'?::

   dtml-let myVariable='Beep'
 dtml-var myMethod
   /dtml-let

 Testing .. yes, it does! Cool. So why does this::

   dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10
   start=qs sort=dtml-var sort_key

 give::

   Invalid attribute name, "sort_key", for tag dtml-in
   "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs
   sort=dtml-var sort_key, on line 18 of docsByTitle

 How do I get 'sort_key' in there?

 --
 Jean Jordaan   --technical writer--
 Mosaic Software--Zope 2.1.6 on WinNT and W2K

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Jean Jordaan

Hi all

The answer to my previous question makes this one occur to
me: if dtml-var id in a method refers to the containing
document's id, does 'myMethod' get to see 'myVariable'?::

  dtml-let myVariable='Beep'
dtml-var myMethod
  /dtml-let

Testing .. yes, it does! Cool. So why does this::

  dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10 
  start=qs sort=dtml-var sort_key

give::

  Invalid attribute name, "sort_key", for tag dtml-in 
  "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs 
  sort=dtml-var sort_key, on line 18 of docsByTitle

How do I get 'sort_key' in there?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Phil Harris

I seem to remember a entry to the collector about this, I think your stuck
with having a 'static' sort key.

or you could do something like

dtml-if "sort_key=='sort1'"
  dtml-in ..
  /dtml-in
dtml-elif "sort_key=='sort2'"
 .
.
 .
dtml-else
 .
.
/dtml-if

If you see what I mean.

Phil

- Original Message -
From: "Jean Jordaan" [EMAIL PROTECTED]
To: "'Phil Harris'" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 3:45 PM
Subject: RE: [Zope] dtml-let .. method /dtml-let


 hi Phil

  ???

 nope ..

  sort=sort_key

 not "sort_key", "'sort_key'", or dtml-sort_key; either :(

 dtml-var sort_key works fine, outside the dtml-in ... tag

 --
 jean


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Adam Karpierz

 Phil Harris [EMAIL PROTECTED] wrote:
I seem to remember a entry to the collector about this

There is a patch for Zope 2.2.1b1:
http://classic.zope.org:8080/Collector/1542/view

Please for discussion about it.

Regards
--
Adam Karpierz
[EMAIL PROTECTED]




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Jean Jordaan

Hi Phil, RDM, Adam

 I seem to remember a entry to the collector about this, 
 I think your stuck with having a 'static' sort key.

yeech!

 or you could do something like

 dtml-if "sort_key=='sort1'"

that'll do as a workaround .. 

 You can always you his patch in the meantime, though.

I'm too chary of living on the bleeding edge .. 

Now I'm trying to do::

  dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10 start=qs
   dtml-var reverse
   sort=title

but this won't work either::

  Document Template Parse Error
  Invalid attribute name, "

Thanks for the answers!
-- 
jean

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Bill Anderson

Jean Jordaan wrote:
 
 Hi all
 
 The answer to my previous question makes this one occur to
 me: if dtml-var id in a method refers to the containing
 document's id, does 'myMethod' get to see 'myVariable'?::
 
   dtml-let myVariable='Beep'
 dtml-var myMethod
   /dtml-let
 
 Testing .. yes, it does! Cool. So why does this::
 
   dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10
   start=qs sort=dtml-var sort_key
 
 give::
 
   Invalid attribute name, "sort_key", for tag dtml-in
   "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs
   sort=dtml-var sort_key, on line 18 of docsByTitle
 
 How do I get 'sort_key' in there?

First, you can't have dtml in dtml. Period.

Next, when you go to do a dtml-in (AIUI), the objects in the dtml-in are pushed to the 
front (top?) of the namespace.
sort_key would need to be a property/attribute of the ccDocClass for this to work, and 
you would just use sort=sort_key.

If sort_key is not a property of the ccDocClass objects, you have to do it some other 
way. 


UNTESTED HYPOTHESIS:
IF sort_key is in the request space, you _MIGHT_ be able to do
sort=REQUEST['sort_key']. But I am not sure; it's just a guess.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )