nuxeo-localizer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nuxeo-localizer] Proposal: local object


From: Milos Prudek
Subject: Re: [Nuxeo-localizer] Proposal: local object
Date: Fri, 15 Feb 2002 22:21:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020205

A side effect of LocalContent is the separation between the data
(also known as content) and the software (presentation and logic).

It's a feature.

Yeah, I agree wholeheartedly.

And maybe even a "variable variable" could be created: 'long_date_'+ENV_LANG_VAR. I think it's possible to do this in DTML, but I don't presently know the syntax.


I don't understand..

Ummm... okay, a variable variable is 'aac' in this example:

<dtml-call "REQUEST.set('aac','yyy')">
<dtml-call "REQUEST.set('varname','aa'+'c')">
<h2><dtml-var "_['aac']">
<h2><dtml-var "_[varname]">

So going back to my original example, it would look like this:

<dtml-call "REQUEST.set('varname','long_date_'+ENV_LANG_VAR)">
<dtml-var "_[varname]">


So you get rid of the whole <dtml-if><dtml-elif><dtml-elif>...<dtml-else> chain. Everything in just two lines.

Not that I like self-modyfing code. But if it's short, it's not that bad.

--
Milos Prudek





reply via email to

[Prev in Thread] Current Thread [Next in Thread]