2010年8月アーカイブ

Smartyでプルダウンの設定をするとき2種類あります。


$m.category_hに連想配列でnameとvalueが設定されている場合
$category_h.typeで選択済み項目のvalueが入ってるとします。


1)全部Smarty任せ

{html_options name='category' options=$m.category_h selected=$category_h.type}

selectタグとoptionタグ全部書き出してくれます。


2)一行目にごにょごにょ入れたい時

{html_options options=$m.category_h selected=$category_h.type}

だとoptionタグだけ(selectedを選択済みに)
こんな風に利用します。

<select name="categpory" >
option value="">選択して下さい</option>
{html_options options=$m.category_h selected=$category_h.type}
</selected>

◆smrshの設定

/etc/smrsh の中のデータを実行できる。
シンボリックリンクを張ると便利。
実行できるファイルを教えてあげる感じ。

$ln -s /***/***/sample/sample.php sample.php

$ll
demo.php -> /***/***/sample/sample.php

てな

◆/etc/aliasesの設定
/etc/aliasesで、エイリアスを設定

demo: "|/***/***/sample/sample.php"
を追加

newaliases

を実行