ユーザ用ツール

サイト用ツール

Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/e1d59635bbc11986839ea8127ab0460e.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/e1d59635bbc11986839ea8127ab0460e.metadata failed

よく使うsmarty
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/e1d59635bbc11986839ea8127ab0460e.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/e1d59635bbc11986839ea8127ab0460e.xhtml failed

よく使うsmarty

よく使うsmarty

 JSとSmarty使用

{literal} ..... {/literal}

 エスケプとデータの自動改行

 {$AssignData.ac_text_14|escape|nl2br}

 アサインデータを改行

 {html_checkboxes name="industry" options=$INDUSTRY assign="checkboxes_industry"}
 {foreach from=$checkboxes_industry item="checkbox"}
   <li>{$checkbox}{cycle values=",<br />"}</li>
 {/foreach}

 プルダウンoptions

 {html_options name="mployees" options=$MPLOYEES selected=$mployees}

 チェックボックスcheckboxes

 {html_checkboxes name='contact_type_id' options=$contact_types
       selected=$contact.contact_type_id separator='<br />'}

 ラジオボダンradios

 {html_radios name="preference" options=$PREFERENCE selected=$preference}

 フォレーチforeach

 {foreach from=$LIST key=key item=value}
   {$value.ctf_reg_time|date_format:"%Y年%m月%d日%H時%M分%S秒"}
 
 {foreachelse}
 {/foreach}

 日付の判定

 {if $YYYYmmddHH >= 2010062201}
 
 {/if}

日付の表示

 {$m_reg_time|date_format:"%Y年%m月%d日%H時%M分%S秒"}
よく使うsmarty.txt · 最終更新: 2013/12/02 10:56 by luis_lee