[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Using Zope Page Templates

webmaster@zope.org webmaster@zope.org
Wed, 15 Jan 2003 15:34:40 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx#2-59

---------------

    Now, with your HTML editor, save the above HTML to the URL of the
    'index_html' Page Template followed by '/source.html', for
    example, 'http://localhost:8080/FileLib/index_html/source.html'.
    Notice that the URL to *save* the 'index_html' page ends in
    'source.html'.  Because Page Templates are dynamic, you need a way
    to edit the raw source of the template, unrendered by the page
    template language.  Appending 'source.html' to a Page Template
    gives you this raw source. Note, if the content-type of your page
    is 'text/xml' then you'll use 'source.xml', rather than
    'source.html'.

      % Anonymous User - Apr. 22, 2002 2:16 pm:
       The index_html object is a file not a directory so saving to index_html/source.html doesn't make sense.?.? :\

      % Anonymous User - May 29, 2002 5:28 pm:
       ---Agreed. I find this paragraph totally baffling.

      % Anonymous User - June 2, 2002 3:05 am:
       Some HTML editors have a "save to URL" options. (In mozilla composer it is called "Publish As".) The idea is
       that you provide a URL on the server and the editor uses it to submit your file. true, index_html is not a
       directory, but neither is "FileLib". Both are just objects in Zopes database and segments of the URL string. Anyway,
       if you use one of the tools that have this feature, this paragraph should make sense to you. If you don't,
       don't worry about - just paste the HTML source into the Zope interface!

      % Anonymous User - June 11, 2002 11:14 am:
       How about we include a list of "compatible" editors that CAN do this as well as a list of editors that CANNOT
       do this?
       it seems you are making assumptions that we all use the same tools you use.

      % mcdonc - June 15, 2002 11:45 am:
       Are you going to keep that list current for me? ;-)

      % Anonymous User - June 20, 2002 10:37 am:
       Does the name 'source.html' have the special meaning that Zope will use the contents as source, or would any
       'XXX.html' work?

      % Anonymous User - June 24, 2002 10:36 am:
       did i miss it or did we go over how zope stores files internally already. does the files all being in a
       database limit you to managing zope using the web interface?

      % Anonymous User - July 19, 2002 6:15 pm:
       I agree, very confusing paragraph. Are we HTTP saving/updating index_html (i.e. just saving the changes
       directly from maya into Zope using HTTP rather than using ZMI?). If so, it is very confusing to use NEW WAYS
       OF EDITING OBJECTS that have not been explained in a section meant to teach something else...

      % Anonymous User - Aug. 6, 2002 11:00 pm:
       This confused me also. A couple suggestions to make it hopefully more clear:
       1. Tell us which protocol is being used with this "save to URL" function of your HTML editor. Is it HTTP PUT?
       Something else? Beats me.
       2. Give primary instructions in a non-specific manner (i.e., tell us to use the ZMI first). Then say
       something like "If your HTML editor supports [protocol], you can use it save to the URL of the index_html
       Page Template followed by /source.html.

      % Anonymous User - Aug. 13, 2002 2:52 pm:
       Hey  "mcdonc",
       at this point we'd like to know ANY editor that works. whether current or old versions!

      % Anonymous User - Aug. 27, 2002 7:54 pm:
       This doesn't make any sense with the tools I'm using. In Dreamweaver, you can't upload a file to a file, only
       a folder. I don't know what the documentation is referring too. What I did discover is that in Dreamweaver,
       you can name the file the same name as your object and upload it and everything works fine. If the object
       name is "index_html" then just name your file "index_html" without the dot syntax, and upload the file.
       Everything works fine. If you look at the object in zope, you will see that it is still a template object and
       behaves as one.

      % Anonymous User - Sep. 22, 2002 6:52 am:
       How abt editing the template source in ZMI and just copy/paste above code into the text area?
       Or is this too clever?

      % Anonymous User - Jan. 15, 2003 3:34 pm:
       welll, as crapy it may look and sound.. it works really.. BUT...a better way is to copy/paste the content
       into the page template file index_html i guess ;)