[Zope] Problems with <dtml-tree>

Phil Harris phil@philh.org
Fri, 15 Oct 1999 10:30:12 +0100


I think the problem is that the line that builds the URL has carriage
returns in it, this causes problems.

I had exactly the same problem, and removing the CR's fixed it so the lines:

<A HREF="<!--#var "Outline.absolute_url()"-->/
<!--#var tree-item-url-->?
<!--#if tree-s-->tree-s=<!--#var tree-s--><!--#/if-->
<!--#if tree-e-->&tree-e=<!--#var tree-e--><!--#/if-->
<!--#if tree-c-->&tree-c=<!--#var tree-c--><!--#/if-->">
<!--#var title_or_id--></a>

Should be concatenated, like so (this will wrap in the mail but is meant to
be one line):

<A HREF="<!--#var "Outline.absolute_url()"-->/<!--#var
tree-item-url-->?<!--#if tree-s-->tree-s=<!--#var
tree-s--><!--#/if--><!--#if tree-e-->&tree-e=<!--#var
tree-e--><!--#/if--><!--#if tree-c-->&tree-c=<!--#var
tree-c--><!--#/if-->"><!--#var title_or_id--></a>

HTH

Phil
phil@philh.org


-----Original Message-----
From: clarkeia@smtp.webprovider.com
[mailto:clarkeia@smtp.webprovider.com]On Behalf Of Ian Clarke
Sent: Friday, October 15, 1999 10:25 AM
To: Phil Harris
Cc: zope@zope.org
Subject: Re: [Zope] Problems with <dtml-tree>


Phil Harris wrote:
>
> Hi Ian,
>
> Could you post the dtml code you are using?

Sure, here are the two pages that are of interest, they have been cut
straight from the tutorial except I have changed zb_menu to ll_menu:

ll_menu (was zb_menu in tutorial):

<SPAN CLASS="tree">
<!--#tree Outline branches_expr="objectValues(['Folder', 'DTML
Document'])" nowrap=1 sort=id-->
<!--#if expr="meta_type == 'Folder'"-->
<!--#if tree-item-expanded-->
<IMG SRC="<!--#var SCRIPT_NAME-->/HelpSys/hs_obook" ALIGN="TOP"
BORDER="0" width=16 height=16>
<!--#else-->
<IMG SRC="<!--#var SCRIPT_NAME-->/HelpSys/hs_cbook" ALIGN="TOP"
BORDER="0" width=16 height=16>
<!--#/if-->
<!--#var title_or_id-->
<!--#else-->
<IMG SRC="<!--#var SCRIPT_NAME-->/HelpSys/hs_dnode" ALIGN="TOP"
BORDER="0" width=16 height=16>
<A HREF="<!--#var "Outline.absolute_url()"-->/
<!--#var tree-item-url-->?
<!--#if tree-s-->tree-s=<!--#var tree-s--><!--#/if-->
<!--#if tree-e-->&tree-e=<!--#var tree-e--><!--#/if-->
<!--#if tree-c-->&tree-c=<!--#var tree-c--><!--#/if-->">
<!--#var title_or_id--></a>
<!--#/if-->
<!--#/tree-->
</SPAN>

standard_html_header:

<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
<!--#var css_sheet-->
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#008080" VLINK="#000080">
<TABLE WIDTH="100%" BORDER=0>
<TR VALIGN=TOP>
<TD><!--#var ll_menu--></TD>
<TD> &nbsp; </TD>
<TD><!-- start of content-->

Cheers,

Ian.

--
Ian Clarke                        Email: I.Clarke@strs.co.uk
Homepage: http://www.gnu.demon.co.uk/
Also see: http://freenet.on.openprojects.net/
"All we see and all we seem is but a dream within a dream"