|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mjimmy Smarty Rookie
Joined: 07 Dec 2011 Posts: 8
|
Posted: Sat Mar 01, 2014 9:40 pm Post subject: Compiler Error wegen [ |
|
|
Bei mir funktioniert das hier nicht:
{html_options name=Geraet[$k1] options=$options[$k1] selected=$i1}
genauso wenig wie
{html_options name=Geraet.$k1 options=$options.$k1 selected=$i1}
Hat mir jemand eine Idee, der Fehler lautet:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/www/htdocs/w011aa00//smarty/templates/0rapport_newi.tpl" on line 134 "{html_options name=Geraet[$k1] options=$options[$k1] selected=$i1}" - Unexpected "[", expected one of: "}" <-- thrown in /www/htdocs/w011aa00/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 134 |
|
Back to top |
|
pvdb Smarty Rookie
Joined: 07 Mar 2014 Posts: 6
|
Posted: Fri Mar 07, 2014 2:26 pm Post subject: |
|
|
Hi,
versuch mal dies hier:
{html_options name=$Geraet.k1 options=$options.k1 selected=$i1}
Immer nur vorne das $ nutzen. |
|
Back to top |
|
mjimmy Smarty Rookie
Joined: 07 Dec 2011 Posts: 8
|
Posted: Sun Mar 16, 2014 7:15 am Post subject: |
|
|
Ich schreib mal mehr von meinem Quelltext, damit sich das Problem klarer darstellt:
<h2>Geräte Grunddaten: » Geräte-Daten:{html_checkboxes name='wup' options=$val_cb selected=$wup }</h2>
<table cellpadding=2 cellspacing=0 width=980>
{foreach name=wauftrag1 from=$wauftrag.0 item=i1 key=k1}
{if $k1|in_array:$show1}
<input type="hidden" name=Geraet[{$k1}] value="{$i1}" size="80">
{elseif $k1|in_array:$show_sel1}
<tr bgcolor="silver">
<td>
{$smarty.foreach.wauftrag1.iteration}. {$k1|capitalize}
</td><td>
{html_options name=Geraet['$k1'] options=$options['$k1'] selected=$i1}
</td>
</tr>
{else}
<tr bgcolor="silver">
<td>
{$smarty.foreach.wauftrag1.iteration}. {$k1|capitalize}
</td>
<td>
<input type="text" name="Geraet[{$k1}]" value="{$i1}" size="106">
</td>
<tr>
{/if}
{/foreach}
</table> |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|