Re: [Zope] create DTML-Source-link like on zope.org

2000-08-03 Thread Chris Withers

Svante Kleist wrote:
 Also, document_src() is a "Python method" function
 included in the "Python Method" product

Sorry but that simpyl isn't true :S

The method below works on a slightly patched Zope 2.1.6 with no Python
Methods product installed...

cheers,

Chris

!--#var standard_html_header--
pre
!--#var "document_src(REQUEST,RESPONSE)" html_quote--
/pre

!--#call "RESPONSE.setHeader('content-type','text/html')"--

!--#var standard_html_footer--

___
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] create DTML-Source-link like on zope.org

2000-08-03 Thread Bill Anderson

Chris Withers wrote:
 
 Deryk Barker wrote:
   Try something like:
  
   http://www.mysite.com/folder/dtmlmethod/view_source
 
  404 document not found...:-(
 
 Of course it was, I made up the url as an example :P
 
  I'd like to view the source of my index_html.
 
 So you go to:
 
 http://www.yoursite.com/index_html/view_source.

Returns a 404 on my systems ...

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




Re: [Zope] create DTML-Source-link like on zope.org

2000-07-30 Thread Chris Withers

Deryk Barker wrote:
snip how-to for view source
 
 Well I did and get a NameError looking for document_src.

What object are you trying to view the source of?
It's only work (and only makes sense) on things like DTML methods and
DTML documents.

cheers,

Chris

___
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] create DTML-Source-link like on zope.org

2000-07-30 Thread Svante Kleist


Also, document_src() is a "Python method" function
included in the "Python Method" product

 URL: http://www.zope.org/Members/4am/PythonMethod 

If you're pre-2.0 you have to install that one yourself.

2.0 contains "Python Methods", and document_src() comes for free
(I think, but I'm not 100% sure).

/ Svante Kleist, NEMESIS systemDesign, Stockholm

--On Sunday, July 30, 2000 10:37 +0100 Chris Withers [EMAIL PROTECTED] 
wrote:

 Deryk Barker wrote:
 snip how-to for view source

 Well I did and get a NameError looking for document_src.

 What object are you trying to view the source of?
 It's only work (and only makes sense) on things like DTML methods and
 DTML documents.

 cheers,

 Chris

 ___
 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] create DTML-Source-link like on zope.org

2000-07-29 Thread Marcus Schopen

Hi there,

how is it possible to create "show DTML-Source"-link like on some sites on zope.org.

Thank you
Marcus
__

 (0   Marcus Schopen
 //\   Bielefeld, Germany
 V_/_
__


___
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] create DTML-Source-link like on zope.org

2000-07-29 Thread Chris Withers

Put a link as follows on your page:

a href="view_source"show DTML-Source/a

Then create a dtml method called view_source.

What do you put in it? Well, see the following:

http://www.zope.org/view_source/view_source

*grin*

Chris

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