For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > November 2005 > Re: [SMARTY] Modifiers on embedded variables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] Modifiers on embedded variables
boots

2005-11-04, 9:57 pm

--- "A.J. Brown" <aj@bitnotion.com> wrote:
> Is there any way to use modifiers on embedded variables using
> backticks?

[..snip...]
> However, I've run across similar situations where using {assign} was
> not appropriate, and I've had to resort to formatting the string in
> the business logic :(. Is there any way to use modifiers on
> `backticked` variables that I'm missing?


No, it is not supported. Backticks do not start a new context.

Why is assign not appropriate? Have you considered {capture} for more
complicated texts? Another trick when using {popup} is to use a JS
callback to assign the text:

<script>
function MyPopuptext() {ldelim}
return '{$popuptext|escape:"javascript"}';
{rdelim}
</script>

<a href="java script:void(0);" {popup
function="MyPopuptext()"}>{$data[list].idusers}</a>

boots




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com