Subject: [Zope-dev] Re: [Zope] tree alignment
From: Adonis El Fakih <[email-masked]>
To: [email-masked]
Date: Fri, 12 Nov 1999 04:16:28 -0500 (EST)
List-Id: Developers of the Z Object Publishing Environment <zope-dev.zope.org>

Hi,

I made some modifications to the TreeTag.py module to allow the user
control over the alignment of the cells created by the moodule. Since this
is my first time using python ( my background is Perl and PHP) I made it
very simple.  If you set a flag align=1 in the dtml-tree tag it will use
the ALIGN="LEFT" used in Zope 2.0.1, otherwise it will not insert an
ALIGN tag in the <TD> tag.

The solution is good enough for us, and I would like to pass this by you
for comments, also I would like to ask for this change to be inserted in
the Zope distribution.  This will us one step closer to being 
internationalization friendly.

Best regards,
Adonis

On Fri, 12 Nov 1999, Adonis El Fakih wrote:

> Date: Fri, 12 Nov 1999 03:19:58 -0500 (EST)
> From: Adonis El Fakih <[email-masked]>
> To: [email-masked]
> Subject: [Zope] tree alignment
> 
> Hi,
> 
> I am facing an interesting challenge.
> 
> I want to use the dtml-tree tag in document that uses right to left
> alignment (Arabic).  In HTML we can define the DIR=RTL tag in the
> <HTML> tag and all tables within a document will be flipped as to
> accomodate for the RTL behaviour.  Unfortunalty the dtml-tree explicitly
> sets the alignment of the id/titles to the left, making the dtml-tree
> useless for these pages.  Is there a way to tell the object the alignment
> required? Or do I have to dig into zope's code to see how to change
> this? 
> 
> Thanks in advance.
> 
> Adonis
> 
> --
> Adonis El Fakih - President, CEO
> Engineering Graphical Solutions, Inc. (EGS)
> 70 Boston Road, Suite A301, Chelmsford MA 01824 USA
> Fax (978) 244-0544 - [email-masked]
> 
> 
> _______________________________________________
> Zope maillist  -  [email-masked]
> 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 )
> 

--
Adonis El Fakih - President, CEO
Engineering Graphical Solutions, Inc. (EGS)
70 Boston Road, Suite A301, Chelmsford MA 01824 USA
Fax (978) 244-0544 - [email-masked]
114a115
> 			  align=1,
401a403,410
>         # define the alignment
> 	if   args.has_key('align') and args['align']:
> 		tableAlign='ALIGN="LEFT"'
> 	else : 
> 		tableAlign=' '
> 
> 
> 
404c413
<         output('<TD%s%s VALIGN="TOP" ALIGN="LEFT">' %
---
>         output('<TD%s%s VALIGN="TOP" %s>' %
406c415,416
<                (have_arg('nowrap') and args['nowrap'] and ' NOWRAP' or ''))
---
>                (have_arg('nowrap') and args['nowrap'] and ' NOWRAP' or ''),
>                tableAlign)