如何在 joomla 2.5 的灯箱中加载内容 div?
how to load content div in lightbox in joomla2.5?
我通过一页设计(逐节)创建了一个 joomla2.5 模板。现在我想在灯箱中加载内容 div,当我单击一篇文章时,它会在弹出的灯箱中加载。我怎么做?帮我!请..
第一步是搜索 jquery 灯箱脚本。我更喜欢 fancybox 但它需要商业用途的许可证。您可以从以下网址下载:Fancybox.
然后你必须使用 joomla 方法在你的模板中包含 js 文件。
<?php
$document = JFactory::getDocument();
$document->addScript('/media/system/js/sample.js');
?>
如需进一步帮助:Adding JavaScript
最后一步是准备灯箱内容。可以通过将 tmpl=component
参数添加到 url 来完成,这样内容将在没有模块/样式的情况下加载。
我还建议阅读这篇文章:Adding print pop-up functionality to a component。
希望这对您有所帮助。
我通过一页设计(逐节)创建了一个 joomla2.5 模板。现在我想在灯箱中加载内容 div,当我单击一篇文章时,它会在弹出的灯箱中加载。我怎么做?帮我!请..
第一步是搜索 jquery 灯箱脚本。我更喜欢 fancybox 但它需要商业用途的许可证。您可以从以下网址下载:Fancybox.
然后你必须使用 joomla 方法在你的模板中包含 js 文件。
<?php
$document = JFactory::getDocument();
$document->addScript('/media/system/js/sample.js');
?>
如需进一步帮助:Adding JavaScript
最后一步是准备灯箱内容。可以通过将 tmpl=component
参数添加到 url 来完成,这样内容将在没有模块/样式的情况下加载。
我还建议阅读这篇文章:Adding print pop-up functionality to a component。
希望这对您有所帮助。