昨天只做了detail的靜態網址
今天無意間發現這篇
參考了一下把カテゴリー的靜態網址也弄出來了
RewriteEngine On RewriteRule detail¥/([0-9]+)¥/? /onlineshop/products/detail.php?product_id=$1 [L] RewriteRule list¥/([0-9]+)¥/? /onlineshop/products/list.php?category_id=$1 [L] |
\data\Smarty\templates\mystyle\bloc\category.tpl
44 | <li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> onmark<!--{/if}-->"><a href="<!--{$smarty.const.URL_DIR}-->products/list/<!--{$arrTree[cnt].category_id}-->"<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> class="onlink"<!--{/if}-->><!--{$arrTree[cnt].category_name|escape}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a> |
他只有說要改這個
但我改了\html\user_data\packages\mystyle\bloc\category.tpl後才有作用
25 | <li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> onmark<!--{/if}-->"><a href="<!--{$smarty.const.URL_DIR}-->products/list/<!--{$arrTree[cnt].category_id}-->"<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> class="onlink"<!--{/if}-->><!--{$arrTree[cnt].category_name|escape}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a> |
\data\class\pages\LC_Page_Sitemap.php
把昨天書上沒提到的stiemap也補一下
閱讀全文