金魚屋開発支援シリーズ第10弾
for Joomla! 1.0.x
Joomla! 本来の静的コンテンツ表示と異なり、据付のテキストをJoomla! 経由で表示するコンポーネント。
<?xml version="1.0" encoding="UTF-8" ?> <html> <head> <title>ページのタイトル</title> <meta name="メタ1" value="メタ値" /> <meta name="メタ2" value="メタ値" /> <meta name="メタ3" value="メタ値" /> <link src="style.css" type="text/css" /> <link src="style2.css" type="text/css" /> <style type="text/css"> p { font-size: medium; } </style> <script type="text/javascript" src="script.js"></script> </head> <body> <h1>静的コンテンツ</h1> <p>本文</p> </body> </html>
mos_actions かmod_rewrite を使用できることが前提
変換表示したいファイルをJoomla 経由で処理するように設定する。
Action text/html /jos/index.php?option=com_kingyoya_translate&Itemid=2&path=
URL 変換時に末尾に元のURL が補完されるため、変換先URL の末尾にpath= が必要。
RewriteEngine on RewriteRule ^$ index.php?option=com_kingyoya_translate&Itemid=55 [L]