0

私は実際にhttp://virtuemart.net/documentation/Developer_Manual/Modifying_the_Layout.htmlこのページの助けを借りて製品の詳細ページをカスタマイズしています。外部と内部のJavaScriptを含める必要がありますが、スクリプトを追加するかどうかはわかりません。誰かがこれを行うのを手伝ってください。

製品詳細ページを変更するには。次のファイルcomponents/com_virtuemart / themes / default / templates / product_details/flypage.tbl.phpで作業しました。

VirtuemartバージョンはVirtueMart1.1.9安定版です

JoomlaバージョンはJoomlaです!1.5.15安定

前もって感謝します。

4

1 に答える 1

0

ここにコメントのあなたの応答に基づいて答えがあります:

//This line defines what JavaScript file you wish to add, change it as needed.
$myJsFile = JURI::Base() . 'templates/my_template_name/js/myJsFile.js';

//this line fetchs the jdocument object which is needed to add items to the head (amongst other things)
$document =& JFactory::getDocument(); //Drop the & if PHP5

//This line adds the previously setup JS url
$document->addScript($myJsFile);

IE条件付きタグなどのカスタムを追加する場合は、このオブジェクトの使用方法について、 http: //docs.joomla.org/Adding_JavaScript_and_CSS_to_the_pageを参照してください。

于 2011-08-22T21:49:42.773 に答える