Re: [Zope] Re:GoLive (or, redirecting to index.html)
On Wed, Nov 01, 2000 at 03:10:57PM -0700, Bill Anderson wrote: dtml-var "_['index.html']" I tried that too, but it also had problems. That format would load the index.html file OK, but most of the links within the page would be wrong in the case where the page is accessed via a URL like http://fqdn.com/subsite (note, no final "/"). The javascript code in index.html (generated by the Web Studio tool) generates an HTML BASE element with the HREF attribute set to the concatenation of the window.location (or window.location.href) value with "subsite", resulting in an HREF value of "http://fqdn.comsubsite" in this case. SNAFU. This problem stems from the quirky code generated by Web Studio, but it forced me to access the page via a redirect rather than incorporating it directly via dtml-var. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ 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] Re:GoLive
on 1/11/00 10:47 am, Stephan Goeldi at [EMAIL PROTECTED] wrote: Is there? And are there known problems with Zope? "In theory" it all works fine. GoLive can ftp open dtml files. except because they are called index_html and not index.html, GoLive thinks they are text files and not html template files. This is such a pain. Using a WYSIWYG tool (on a mac) to edit dtml would be cool. This for me, effectively makes it too much of pain to use goLive. So close and yet... I think there's a trick where dtml files can be saved as index.html, and then you create a method that redirects index_html or /whatever/wherever/ to index.html in the same folder, but I'm not sure how to do that. Someone has shown how to do it on this list. Try searching here... http://www.egroups.com/messages/zope Using WebDAV (with goliath) may be an option. I've found BBEdit to be OK, although creating new dtml files is errors. Hope this helps tom ___ 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] Re:GoLive
tom smith wrote: I think there's a trick where dtml files can be saved as index.html, and then you create a method that redirects index_html or /whatever/wherever/ to index.html in the same folder, but I'm not sure how to do that. That should be pretty easy . . . Zope will let you add objects that have dots in the titles, so just put a method "index_html" in the root folder which has the following line: dtml-var index.html Then wherever there is "index.html", it will be displayed as the default document (go Acquisition!). Note that using a ".html" in files will make things a bit tricky sometimes when coding Python statements, because in python, "index.html" is looking for a property (or whatever) "html" in the object "index," which isn't going to exist, so you've got to be a bit cagey . . . -CJ ___ 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] Re:GoLive
on 1/11/00 2:31 pm, Christopher J. Kucera at [EMAIL PROTECTED] wrote: tom smith wrote: I think there's a trick where dtml files can be saved as index.html, and then you create a method that redirects index_html or /whatever/wherever/ to index.html in the same folder, but I'm not sure how to do that. That should be pretty easy . . . Zope will let you add objects that have dots in the titles, so just put a method "index_html" in the root folder which has the following line: dtml-var index.html Then wherever there is "index.html", it will be displayed as the default document (go Acquisition!). This does the trick. Only when you get to complicated products like Squishdot with lots of dtml files, it'll take some working out all the broken links. Why doesn't zope have a list of default file names... index_html, index.html, default.html, whatever? ___ 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] Re:GoLive
I thought for a minute you could add _HTML as a suffix type in GoLive's network prefsthe icon changed but little else. Anyone know if GoLive 5 with WebDav can edit dtml files...or Dreamweaver? thanks tom ___ 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] Re:GoLive
On Wed, 1 Nov 2000, tom smith wrote: I think there's a trick where dtml files can be saved as index.html, and then you create a method that redirects index_html or /whatever/wherever/ to index.html in the same folder, but I'm not sure how to do that. Someone has shown how to do it on this list. Try searching here... http://www.egroups.com/messages/zope Make a DTML Method called index_html in Zope's root folder containing: dtml-var index.html Whenever Zope looks for index_html and can't find it, it will search the acquisition path, acquire your root index_html, which will then include your index.html. Magic. ;-) tom --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:[EMAIL PROTECTED] Going Virtual, L.L.C. http://www.goingv.com/ ___ 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] Re:GoLive
Hmmm... I don't know if this would apply..but..there *is* a howto on a method to allow requests for index.html tobe redirected to index_html. Basically the executive summary is that methods named as the various possible choices (index.html, index.htm, index.HTML, etc.) containing the single word ' index_html ' .. This has the effect of redirecting requests for those URLs to index_html in each directory. This would probably work in reverse, unless Zope would choke on the extension, which is I assume what you are talking about.. If not, perhaps GoLive, Dreamweaver, etc, could be modified at some level to recognize as their default mime type text/html and not text/plain or whatever it is now.. (untested) so that index_html would be interpreted as a html file... I use BBEdit myself frequently to edit DTML and although the nifty BBEdit formatting capabilities aren't available (and would probably get very confused by DTML if they were..) it still beats anything else I've seen for editing *existing* dtml pages.. (like Stephen said..) My experiences have been with BBEdit 5.x, has anyone tried BBEdit 6.x with DTML? Still, this is not the optimal fix, because I still use BBEdit, for example on a lot of other kinds of textfiles and HTML as the default behavior would be something I would have to keep turning off.. There has to be an easy way...I would be surprised if there wasn't some way to configure DTML capabilities into these programs.. it just will take a little creative thinking... Of course a WYSIWYG tool could never in any way simulate the dynamics of a Zope site, so using them would still require DTML competency.. -Chris on 1/11/00 10:47 am, Stephan Goeldi at [EMAIL PROTECTED] wrote: Is there? And are there known problems with Zope? "In theory" it all works fine. GoLive can ftp open dtml files. except because they are called index_html and not index.html, GoLive thinks they are text files and not html template files. This is such a pain. Using a WYSIWYG tool (on a mac) to edit dtml would be cool. This for me, effectively makes it too much of pain to use goLive. So close and yet... I think there's a trick where dtml files can be saved as index.html, and then you create a method that redirects index_html or /whatever/wherever/ to index.html in the same folder, but I'm not sure how to do that. Someone has shown how to do it on this list. Try searching here... http://www.egroups.com/messages/zope Using WebDAV (with goliath) may be an option. I've found BBEdit to be OK, although creating new dtml files is errors. Hope this helps tom ___ 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] Re:GoLive
On Wed, Nov 01, 2000 at 03:32:07PM +, tom smith wrote: Anyone know if GoLive 5 with WebDav can edit dtml files...or Dreamweaver? With Dreamweaver 2.0 I can use File - Open to open and edit a file with a name like "index_html", but when I define a Dreamweaver "site" that encompasses files like "index_html" then Dreamweaver refuses to open such files, putting up an alert that says "The file 'index_html' could not be opened because Dreamweaver does not open files without an extension'. This is a major PITA. Perhaps there is some configuration parameter that would allow this, but I haven't found it. Maybe newer versions of Dreamweaver are more accomodating? -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ 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] Re:GoLive
On Wed, Nov 01, 2000 at 08:31:09AM -0600, Christopher J. Kucera wrote: That should be pretty easy . . . Zope will let you add objects that have dots in the titles, so just put a method "index_html" in the root folder which has the following line: dtml-var index.html That obvious solution fails in some cases. It failed for me the very first time I needed it, when I tried to integrate web pages created by the Web Studio tool into a larger Zope website. Web Studio (ack, phooey) creates a main index.html that uses Javascript to redirect to another page that acts as the real entry point. That Javascript code gets confused when loaded via dtml-var index.html as above. I resorted to doing the following instead: dtml-call "RESPONSE.redirect(URL1 + '/index.html')" So now it takes two redirects to get to the real page, darn it. The above _could_ redirect straight to the real entry page, but exact knowledge of which page that is belongs to the subsite, not in my code. And it turns out that the subsite _has_ changed its entry page since I set up the above code. With Zope, simple things are easy, but slightly complex things tend to be hard. It's a weird learning/technology curve and I sure hope it flattens out soon... I've done a lot of website programming in PHP, Java, Perl, and AOLserver/Tcl -- none of those seem to have Zope's complexity at the point of creating simple database-backed websites. Zope doesn't even have a decent self-registering user login system out of beta yet. Sheesh. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ 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] Re:GoLive
Fred Yankowski wrote: On Wed, Nov 01, 2000 at 08:31:09AM -0600, Christopher J. Kucera wrote: That should be pretty easy . . . Zope will let you add objects that have dots in the titles, so just put a method "index_html" in the root folder which has the following line: dtml-var index.html That obvious solution fails in some cases. It failed for me the very first time I needed it, when I tried to integrate web pages created by the Web Studio tool into a larger Zope website. Web Studio (ack, phooey) creates a main index.html that uses Javascript to redirect to another page that acts as the real entry point. That Javascript code gets confused when loaded via dtml-var index.html as above. I resorted to doing the following instead: dtml-call "RESPONSE.redirect(URL1 + '/index.html')" I avoid dotted names like th eplague, so my suggestion may not work but you could try: dtml-var "_['index.html']" -- E PLURIBUS LINUX ___ 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 )