{Blocked Content} RE: [SMARTY] capitalize modifier
| From: | A.J. Brown | Date: | Sun, 27 Nov 2005 02:37:08 +0000 |
| Subject: | {Blocked Content} RE: [SMARTY] capitalize modifier | ||
| References: | 1 | Groups: | php.smarty.general php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13180@lists.php.net to get a copy of this message | ||
Warning: This message has had one or more attachments removed
Warning: (not named).
Warning: Please read the "ChisanoMarketingComm-Attachment-Warning.txt" attachment(s) for
more information.
Capitalization isn't necessarily a function of logic. It can be, but most
of the time it isn't. For example, if you want to display all names in
caps...the logic has no business formatting them as so, and shouldn't care
either. If you wanted to later drop the requirement of displaying all names
in caps, you should change the client template, not the logic. Another
example with the same case: if you use the same logic for two different
client systems, one might require all capitals for the display, and the
other might not.
On the other hand, if your LOGIC requires all capitals (ex: SKU's) then
forcing capitals is a function of model/logic, and not display.
Whenever possible, you have to think "is this required for my logic, or
preferred for my display?".
A.J. Brown
-----Original Message-----
From: Daniel Hedrick [mailto:daniel@hedrick.org]
Sent: Saturday, November 26, 2005 3:22 PM
To: Smarty-General
Subject: Re: [SMARTY] capitalize modifier
On Nov 24, 2005, at 1:06 PM, Max Schwanekamp wrote:
> perhaps *you* can fix it yourself and then fill us in on what you did.
I made another mental note as to why I don't use most of the
convenience functions of the Smarty templating system.
Don't get me wrong... I like Smarty a lot. I think it does a great
job of allowing me to separate logic from presentation. But much like
trying to drive nails with a screwdriver, I generally don't use a
template engine to capitalize my strings for me. ;-)
-daniel
--
http://www.hedrick.org/daniel?sig
This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "winmail.dat" was believed to be infected by a virus and has been replaced by this warning message. If you wish to receive a copy of the *infected* attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Sat Nov 26 20:39:17 2005 the virus scanner said: Could not parse Outlook Rich Text attachment Note to Help Desk: Look on the ChisanoMarketingComm MailScanner in /home/virtual/site4/fst/var/spool/mail.quarantine/20051126 (message jAR2dDUh032473). -- Postmaster MailScanner thanks transtec Computers for their support
This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "winmail.dat" was believed to be infected by a virus and has been replaced by this warning message. If you wish to receive a copy of the *infected* attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Sat Nov 26 20:39:17 2005 the virus scanner said: Could not parse Outlook Rich Text attachment Note to Help Desk: Look on the ChisanoMarketingComm MailScanner in /home/virtual/site4/fst/var/spool/mail.quarantine/20051126 (message jAR2dDUh032473). -- Postmaster MailScanner thanks transtec Computers for their support