Hello ! My friend is say to I don't use dtml - I must use Page Template... Ok, I say, and I try it. I have an logo image, named logo. When I use dtml, the <dtml-var logo> is working. But: when I use <p tal: replace here/logo></p>, then the zope replace the <> signs in image definition, and it is don't showed, only it's description. Why ? And why I feel that tal is known less than dtml ? KK -- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
Hi take a look at http://old.zope.org/Members/peterbe/DTML2ZPT/index_html?pp=1 .. you will find there easy examples about how to write DTML in TAL dragos ----- Original Message ----- From: <fowlertrainer@anonym.hu> To: <zope@zope.org> Sent: Tuesday, December 02, 2003 3:16 PM Subject: [Zope] Q1: tal + image
Hello !
My friend is say to I don't use dtml - I must use Page Template...
Ok, I say, and I try it.
I have an logo image, named logo. When I use dtml, the <dtml-var logo> is working.
But: when I use <p tal: replace here/logo></p>, then the zope replace the <> signs in image definition, and it is don't showed, only it's description.
Why ?
And why I feel that tal is known less than dtml ?
KK
-- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
I'm going to try and answer this since I owe a debt and like to pay my debts. The Page Template tags are less powerful than DTML by design. The idea is to force the separation of logic and presentation. Because it's limited, you keep all the difficult logic out of the presentation and keep it in the back where it belongs. Designing this way gives you more flexibility when moving to different platforms or presentation methods. The added benefit of ZPT is that the tag structure is ignored by external HTML editing tools. Joe Goldthwaite -----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org]On Behalf Of fowlertrainer@anonym.hu Sent: Tuesday, December 02, 2003 6:16 AM To: zope@zope.org Subject: [Zope] Q1: tal + image Hello ! My friend is say to I don't use dtml - I must use Page Template... Ok, I say, and I try it. I have an logo image, named logo. When I use dtml, the <dtml-var logo> is working. But: when I use <p tal: replace here/logo></p>, then the zope replace the <> signs in image definition, and it is don't showed, only it's description. Why ? And why I feel that tal is known less than dtml ? KK -- Best regards, fowlertrainer mailto:fowlertrainer@anonym.hu _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
fowlertrainer@anonym.hu wrote:
My friend is say to I don't use dtml - I must use Page Template...
I would give the same advice.
Ok, I say, and I try it.
I have an logo image, named logo. When I use dtml, the <dtml-var logo> is working.
But: when I use <p tal: replace here/logo></p>, then the zope replace the <> signs in image definition, and it is don't showed, only it's description.
Why ?
TAL will automatically HTML-quote upon a 'replace' or 'content' on the idea that you're usually displaying content that way, and want "special characters" to be content-visible. You may tell it otherwise with the 'structure' keyword, which indicates that you're using data that should be written verbatim since it may have HTML structure to it:: <span tal:replace="structure here/logo" /> Your syntax above was quite broken, by the way. I'm assuming it's not what you actually tried to use.
And why I feel that tal is known less than dtml ?
Dunno. Maybe because DTML is older, or because it's more like all the other simple template languages? Still, most modern Zope projects use ZPT. --jcc -- "Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design." (http://www.devx.com/java/editorial/15511)
participants (4)
-
Dragos Chirila -
fowlertrainerļ¼ anonym.hu -
Goldthwaite, Joe -
J Cameron Cooper