You are here: [SMARTY] Using constants dynamically - Plugin? « Smarty Templates Posts « IT news, forums, messages
[SMARTY] Using constants dynamically - Plugin?

Posted by Erik Schmitt on 06/24/05 14:30

Hello,

I have a file with defined constants:

- conf -------------------
hello=Hallo
sleep=schlafen
- /conf ------------------

And I want to access these dynamically like this:

{foreach from=$values key=key item=item}
{#$item#}
{/foreach}


Problem is that {#$item#} ends up with an error.

I tried to use combine the eval()- and the
assign()-functions to get the desired result
but nothing worked.

Can anyone give me a hint? Of course
I could write block-plugin but I do not like
the idea. I am looking for something very
easy with no "syntactical overhead".
Is it possible to write a plugin that works
like {##$item##} on my own?

Thanks!
Erik

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация