我正在尝试将默认灯箱“modal”替换为“slimbox”,因为“modal”没有导航箭头。
我正在使用这些路径来修改 slimbox 的调用
[模板名称]/html/com_virtuemart/productdetails/default.php components/com_virtuemart/productdetails/default.php
Joomla v2.5 Virtuemart 2.0.6 Slimbox2
以下是我的尝试:
//Enable Slimbox2 plugin
$front = JURI::root(true).'/components/com_virtuemart/assets/';
$document = JFactory::getDocument();
$document->addStyleSheet($front.'js/slimbox/slimbox.css');
$document->addScript($front.'js/slimbox/slimbox2.js');
$js = 'jQuery(document).ready(function($) { $("a.lightbox").slimbox(); });';
$document->addScriptDeclaration($js);
//output thumbnail
echo $this->product->images[0]->displayMediaThumb('class="product-image"',true,'class="lightbox" rel="lightbox"'.$this->product->virtuemart_product_id.'"',true,true);
//unset first image not to be show amont additional ones
unset ($this->product->images[0]);
?>
但它仍然无法正常工作,我想知道怎么了?
[参考][3]