Re: [Zope] DTML Question on lines

2000-09-08 Thread Dieter Maurer

Tim Cook writes:
  "Coleman, Bryan" wrote:
   I am trying to itterate through a lines 
  SELECT name="mySelection"
  dtml-in valid_codes
   option value="dtml-var sequence-item" dtml-var sequence-item
  nbsp; /option
In some cases, "html_quote" will be necessary, or a dtml-entity
reference (which automatically does "html_quote") like this:
option value="dtml-var sequence-item html_quote" dtml-var sequence-item
or
option value="dtml-sequence-item;" dtml-var sequence-item


As a general rule, use a dtml entity reference, when a variable
is used in a HTML attribute.


Dieter

___
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 Question on lines

2000-09-07 Thread Rik Hoekstra




 I am trying to itterate through a lines property in the folder so that the
 options will drop down. I did not think that the following code would work
 but I could not think of anything else.

   dtml-in valid_codes
  option value="dtml-var valid_codes"dtml-var
 valid_codesnbsp;/option
   /dtml-in


try (untested):

dtml-in valid_codes
   option value="dtml-var sequence-item"dtml-var idnbsp;/option
/dtml-in

assuming of course that valid_codes is a list

hth

Rik


___
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 Question on lines

2000-09-07 Thread Tim Cook

"Coleman, Bryan" wrote:
 
 I am trying to itterate through a lines property in the folder so that the
 options will drop down. I did not think that the following code would work
 but I could not think of anything else.
 
   dtml-in valid_codes
  option value="dtml-var valid_codes"dtml-var
 valid_codesnbsp;/option
   /dtml-in
 
 
Try this Bryan,

SELECT name="mySelection"
dtml-in valid_codes
 option value="dtml-var sequence-item" dtml-var sequence-item
nbsp; /option
/dtml-in
/SELECT


-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

___
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 question from a newbizzzzz I want to access a dtmlpage under a subfolder subfolder

2000-07-27 Thread Marcel Preda

On Thu, 27 Jul 2000 [EMAIL PROTECTED] wrote:

 
 I want to access a dtml page under a subfolder
 
 - portal (folder)
- index1 (dtml)
- reunion (folder)
   -  index2 (dtml)
 
 
 I want to acces the index2 variable in the index1 dtml page. How can I do
 it ?
 
 thks for your answer
 David Sergent
 

dtml-with reunion
dtml-var index2
/dtml-with

OR
dtml-var "reunion.index2"

PM


___
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] Réf. : Re: [Zope] dtml question from a newbizzzzz I want to access a dtmlpage under a subfolder subfolder: [Zope] dtml question from a newbizzzzz I want to access a dtmlpage under a subfolder subfolder

2000-07-27 Thread dsergent


thks for your answer, but I use the variable PARENTS[0] in index2 and with
your syntax, the result is not the same.




   
   
"Marcel
   
Preda"   Pour :  [EMAIL PROTECTED] 
   
marcel@puntocc :  
   
.it Objet :  Re: [Zope] dtml question from a  
   
Envoyé par : newbiz I want to access a dtml page under 
a  
zope-admin@zosubfolder subfolder   
   
pe.org 
   
   
   
   
   
27/07/00   
   
10:54  
   
   
   
   
   




On Thu, 27 Jul 2000 [EMAIL PROTECTED] wrote:


 I want to access a dtml page under a subfolder

 - portal (folder)
- index1 (dtml)
- reunion (folder)
   -  index2 (dtml)


 I want to acces the index2 variable in the index1 dtml page. How can I do
 it ?

 thks for your answer
 David Sergent


dtml-with reunion
dtml-var index2
/dtml-with

OR
dtml-var "reunion.index2"

PM


___
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 )




Re: [Zope] DTML question

2000-06-28 Thread Luke Tymowski

Hello,

  dtml-in "PARENTS[0].objectValues(['DTML Document'])" size=3 sort=id
should
 work, no?

No.

This works on my production server, which runs Zope 2.1.14.
dtml-with history
  dtml-with 2000
dtml-in "objectValues(['DTML Document'])" size=3 sort=title reverse
  dtml-var sequence-itembr
/dtml-in
  /dtml-with
/dtml-with

But if I try that same code on 2.2b2 it doesn't work.
If the subfolder is down 1, then size=1 works, but size=2 returns
everything.
If the subfolder is down 2, then size=1 works, size=2 works, but size=3
returns everything.

By down 2 I mean like the example code above (folder I want to query is two
levels down).

Maybe it's a 2.2 bug?

Luke




___
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 question

2000-06-28 Thread R. David Murray

On Wed, 28 Jun 2000, Luke Tymowski wrote:
 If the subfolder is down 2, then size=1 works, size=2 works, but size=3
 returns everything.
 
 By down 2 I mean like the example code above (folder I want to query is two
 levels down).
 
 Maybe it's a 2.2 bug?

Maybe you need the 'orphan' parameter on your dtml-in?

--RDM


___
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 question

2000-06-28 Thread Dieter Maurer

Rik Hoekstra writes:
  
  
  Luke Tymowski wrote:
   
   Hello,
   
   I want to retrieve the last 3 filenames from a subfolder and display them in
   a document. If I set the size of the retrieval to 1, I get just 1 name
   returned. If I set the size to 3, I get everything in the folder. (if I use
   2 I also get everything in the subfolder )
   
   Here is my code (using 2.2b2):
   
   dtml-with Document
 dtml-in "objectValues(['DTML Document'])" size=3 sort=id
 dtml-var id dtml-var titlebr
 /dtml-in
   /dtml-with
   
  
  You could try (untested):
  
  dtml-with Document
dtml-in "objectValues(['DTML Document'])[-3:]" sort=id
dtml-var id dtml-var titlebr
/dtml-in
  /dtml-with
This will first select 3 elements and only then sort.
Maybe not, what on wants.

dtml-in "Document.objectValues(['DTML Document'])" sort=id reverse size=3 orphan=0

may do the trick.



Dieter

___
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 question

2000-06-28 Thread Curtis Maloney

On Thu, 29 Jun 2000, Luke Tymowski wrote:
 Hello,

  Maybe you need the 'orphan' parameter on your dtml-in?

 Thanks. That did the trick.

 I really hope that O'Reilly book gets done sooner rather than later.

Well, to be honest, I've found the existing documentation on that topic to be 
very helpful.  My only problem with it has been seemingly erroneous (or at 
the very least, less than clear) example code.

 I wasn't seeing that problem on my production server (2.1.4) because it has
 70-odd documents in the folder I query. (I'm trying out things on a
 development machine with 2.2.)

Yeh, I thought so. (o8


 Luke

Have a better one,
Curtis.

dtml-var standard_work_disclaimer

___
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 )