-----Original Message----- From: Marco Mariani [mailto:m.mariani@imola.nettuno.it] Sent: Friday, June 23, 2000 9:54 PM To: Jay, Dylan; zope@zope.org Subject: Re: [Zope] (no subject)
On Fri, Jun 23, 2000 at 04:32:39PM +1000, Jay, Dylan wrote:
It seems to me that a few tweaks to the dtml-if syntax would be beneficial
something like the following would certainly clean up some of the logic I end up writing.
<dtml-if X> <a href="a_url"> <dtml-always> link text <dtml-else> (no link currently available) <dtml-then> </a> </dtml-if>
<dtml-if X> <a href="a_url"> link text </a> <dtml-else> link text (no link...) </dtml-if>
yes but the repitition of "link text" could be a real pain if "link_text" is big. Repitition is always a maintance nightmare.
Now what's cleaner and easier to the eyes?
Or for the obfuscated DTML context:
<dtml-var "['<A HREF=....>',''][not X]"> link text <dtml-var "['</A>','(no link...)'][not X]">
I've no idea about this syntax. Does it work?
:-)
-- "This company has performed an illegal operation and will be shut down. If the problem persists, contact your vendor or appeal to a higher court." - Signal11 on slashdot
"Jay, Dylan" wrote:
-----Original Message----- From: Marco Mariani [mailto:m.mariani@imola.nettuno.it] Sent: Friday, June 23, 2000 9:54 PM To: Jay, Dylan; zope@zope.org Subject: Re: [Zope] (no subject)
On Fri, Jun 23, 2000 at 04:32:39PM +1000, Jay, Dylan wrote:
It seems to me that a few tweaks to the dtml-if syntax would be beneficial
something like the following would certainly clean up some of the logic I end up writing.
<dtml-if X> <a href="a_url"> <dtml-always> link text <dtml-else> (no link currently available) <dtml-then> </a> </dtml-if>
<dtml-if X> <a href="a_url"> link text </a> <dtml-else> link text (no link...) </dtml-if>
yes but the repitition of "link text" could be a real pain if "link_text" is big. Repitition is always a maintance nightmare.
If it is, make it a method or attribute. <dtml-if X> <a href="a_url"> <dtml-var linktext></a> <dtml-else> <dtml-var linkText> (No Link Available) </dtml-if X> You could make the links objects, such that: <dtml-in "objectValues('Link Object')"> <br> <a href="<dtml-var linkURL>" <dtml-var linkText> </a> <dtml-else> <p> Sorry, no links available at this time. </dtml-if Link Objects> The real question is why have link text that doesn't link... ;)
participants (2)
-
Bill Anderson -
Jay, Dylan