[Zope] Aligning Images With Text
Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Any help? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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] Aligning Images With Text
Terry Babbey wrote: Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if You might create a dtml variable with a dtml call, e.g., dtml-call "REQUEST.set('image1', _[ProgCode + 'PIC']" Then use your image html tag as img src="dtml-var image1" align="right" ciao! greg. What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Any help? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 )
Re: [Zope] Aligning Images With Text
I get an error message when I try your code. Expression (Python) Syntax error: unexpected EOF while parsing , for tag dtml-call "REQUEST.set('image1', _[ProgCode + 'PIC']", on line 32 of display_html Gregory Haley wrote: Terry Babbey wrote: Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if You might create a dtml variable with a dtml call, e.g., dtml-call "REQUEST.set('image1', _[ProgCode + 'PIC']" Then use your image html tag as img src="dtml-var image1" align="right" ciao! greg. What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Any help? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 ) -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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] Aligning Images With Text
On Wed, 12 Jul 2000, Terry Babbey wrote: Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Untested, but I copied most of it from a working method: dtml-var "_.getitem('ProdCode' + 'PIC',0).tag(align='right')" --RDM ___ 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] Aligning Images With Text
This worked. Now if only I could get my dtml-if statement working. Thanks, Terry "R. David Murray" wrote: On Wed, 12 Jul 2000, Terry Babbey wrote: Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Untested, but I copied most of it from a working method: dtml-var "_.getitem('ProdCode' + 'PIC',0).tag(align='right')" --RDM -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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] Aligning Images With Text
I posted a similar question, but unfortunatly no response on that one. I haven't done it yet, but I guess you could simply change the Image product so that it can handle another parameter. If you use .tag you can only control ALT, HEIGHT, WIDTH and BORDER Look for these things in the Image module and see if you can add ALIGN. Good luck. Please keep us posted if any success. :) - Original Message - From: Terry Babbey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 12, 2000 8:24 PM Subject: [Zope] Aligning Images With Text Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Any help? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 )
Re: [Zope] Aligning Images With Text
Image objects have a tag method for setting all the HTML tags: Try something like (untested): dtml-var "yourimageID.tag(align='right')" ... or tested (from one of my sites): dtml-var "ClearDot.tag(width='25')" -- HTH -- Loren - Original Message - From: "Terry Babbey" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: July 12, 2000 12:24 PM Subject: [Zope] Aligning Images With Text Here is my code: dtml-if "_[ProgCode + 'PIC']" dtml-var "_[ProgCode + 'PIC']" /dtml-if What I would like to do is align the picture to the right of my web page. If I was programming html I would do it like this: img src=T043PIC align=right Any help? Terry -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 )
Re: [Zope] Aligning Images With Text
On Wed, 12 Jul 2000, Terry Babbey wrote: Now if only I could get my dtml-if statement working. dtml-if "_[ProgCode + 'PIC']" I believe this should work (mostly tested): dtml-if "_.has_key(ProgCode + 'PIC')" Note that this will be true if the id exists anywhere in the acquisition path. --RDM ___ 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] Aligning Images With Text
On Wed, 12 Jul 2000, Peter Be wrote: If you use .tag you can only control ALT, HEIGHT, WIDTH and BORDER Look for these things in the Image module and see if you can add ALIGN. As far as I can see from the source, tag should handle arbitrary arguments. The comments certainly say that it does. This is as of 2.1.4, at least. --RDM ___ 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] Aligning Images With Text
Thanks again. Works! "R. David Murray" wrote: On Wed, 12 Jul 2000, Terry Babbey wrote: Now if only I could get my dtml-if statement working. dtml-if "_[ProgCode + 'PIC']" I believe this should work (mostly tested): dtml-if "_.has_key(ProgCode + 'PIC')" Note that this will be true if the id exists anywhere in the acquisition path. --RDM -- __ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __ ___ 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 )