EC-CUBEでSmartyタグの相対パスConst定義について

EC-CUBEではテンプレートエンジンのSmartyを使っているのですが、HTMLデータをもらって、Smartyに当てはめて行く際、
相対パスのConst定義をよく使います。

そんなわけで、ちょいとまとめてみました。

ちなみに、このブログWordPressで書いてるわけですが、
HTMLタグなどがエスケープされてうまく表示出来ないときにはsyntaxhighlighterプラグインが便利ですね。
下のSmartyタグなどもエスケープされてしまったのですが、このプラグインでうまく表示することができました。
素敵過ぎる!

<!--{$TPL_URLPATH}-->
/html/user_data/packages/default/


<!--{$smarty.const.USER_TEMPLATE_REALDIR}-->
html/user_data/packages/


<!--{$smarty.const.TOP_URLPATH}-->
/html/



<!--{$smarty.const.ROOT_URLPATH}-->
/html/



<!--{$smarty.const.HTML_REALDIR}-->
/html/

<!--{$smarty.const.HTTPS_URL}-->
https://ドメイン

<!--{$smarty.const.P_DETAIL_URLPATH}-->
/html/products/detail.php?product_id=

<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->
/html/upload/save_image/


<!--{$smarty.const.DATA_REALDIR}-->
/data/

<!--{$smarty.const.CLASS_REALDIR}-->
/data/class/

<!--{$smarty.const.CLASS_EX_REALDIR}-->
/data/class_extends/

<!--{$smarty.const.TEMPLATE_REALDIR}-->
/data/Smarty/templates/default/

<!--{$smarty.const.TEMPLATE_ADMIN_REALDIR}-->
data/Smarty/templates/admin/

<!--{$smarty.const.TEMPLATE_TEMP_REALDIR}-->
html/upload/temp_template/

<!--{$smarty.const.GRAPH_URLPATH}-->
/html/upload/graph_image/

<!--{$smarty.const.IMAGE_TEMP_URLPATH}-->
/html/upload/temp_image/

<!--{$smarty.const.CART_URLPATH}-->
/html/cart/

<!--{$smarty.const.ADMIN_LOGIN_URLPATH}-->
/html/admin/

<!--{$smarty.const.ADMIN_SYSTEM_URLPATH}-->
/html/admin/system/

<!--{$smarty.const.ADMIN_PRODUCTS_URLPATH}-->
/html/admin/products/


<!--{$smarty.const.ADMIN_ORDER_URLPATH}-->
/html/admin/order/

EC-CUBE構築や機能カスタマイズなどお気軽にご相談ください

その他、smartyに関する記事はこちら
EC-CUBEでphpstormを使う際、tplファイルのsmartyタグを設定する。

EC-CUBEに関する記事一覧

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です