- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我想在我的模块中呈现 Joomla 内容插件,该怎么做?
这是我的代码
<pre>
<?php
defined( '_JEXEC' ) or die;
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('stendas_id, stendas_lat, stendas_lon, stendas_name, stendas_description, stendas_kaire, stendas_desine')
->from('#__stendukai_stendai')
->where('published = 1');
$db->setQuery($query);
$rows = $db->loadObjectList();
require JModuleHelper::getLayoutPath('mod_stendulist', $params->get('layout', 'default'));
</pre>
这里是default.php文件代码
<pre>
<?php
defined( '_JEXEC' ) or die;
$document = JFactory::getDocument();
$document->addStyleSheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-lightness/jquery-ui.css');
$document->addScript("http://maps.google.com/maps/api/js?sensor=false&language=en");
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/jquery.min.js');
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/jquery-noconflict.js');
$document->addScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js');
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/jquery.ui.map.js');
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/frontend_map.js');
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/jquery.ui.map.services.js');
$document->addScript(JURI::base() . 'modules/mod_stendulist/libs/jquery.ui.map.extensions.js');
?>
<div id="themapstuff">
<table class="stendu_table" border="0" cellpadding="0" cellspacing="0" height="151" width="406">
<tbody>
<tr><th width="33">Nr.</th><th width="115">Stendai</th><th width="74">Kairė</th><th width="74">Dešinė</th></tr>
<?php $i=1; ?>
<?php foreach ($rows as $row): ?>
<tr data-gmapping='{"id":" <?php echo $row->stendas_id ?>","latlng":{"lat": <?php echo $row->stendas_lat ?>,"lng": <?php echo $row->stendas_lon ?>},"tags":" <?php echo $row->stendas_name ?>"}'>
<td><?php echo $i++ ?></td>
<td> <span class="title"><?php echo $row->stendas_name ?></span>
<div class="info-box">
<?php echo $row->stendas_description;?>
</div>
</td>
<td><?php echo $row->stendas_kaire ?></td>
<td><?php echo $row->stendas_desine ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</pre>
如果可能,我最感兴趣的是在
中运行内容插件$row->stendas_description
因为这是实际内容,所以其他人是 ID 和别名。
最佳答案
如果您将 Prepare Content 参数设置为 true,自定义 html 模块将呈现插件。
JPluginHelper::importPlugin('content');
$module->content = JHtml::_('content.prepare', $module->content, '', 'mod_custom.content');
https://github.com/joomla/joomla-cms/blob/master/modules/mod_custom/mod_custom.php#L14
关于php - Joomla 2.5 在我的模块中呈现内容插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13309800/
hello world tutorial对于 Joomla 状态: $mainframe is a global variable in Joomla that has lots of useful
我已经通过了:http://docs.joomla.org/How_to_add_breadcrumbs 和 http://api.joomla.org/Joomla-Framework/Applic
在为模块设置添加参数字段时,我正在寻找可能的过滤器列表。 我知道 Text form field type 的示例中存在 filter="raw"和 filter="integer". 但是这些字段的
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 5年前关闭。 Improve this questi
是否可以为 Joomla 1.5 后端和前端实现单点登录。我发现当管理员例如在后端登录并且需要在前端执行一些用户功能时必须再次登录,这有点多余。有没有实现单点登录的方法? 最佳答案 乔姆拉!被实现为两
我们如何在 joomla 中渲染带有标题的模块。因为现在,我可以根据位置渲染模块,但它不包括模块标题。 这是我渲染模块的方式。 title); echo JModuleHelper::renderMo
我正在 joomla 中开发一个自定义搜索模块。所以我正在使用 joomla 的内置数据库连接和功能。 问题是我想在这个模块中使用分页类,但不知道任何提示。 请帮我解决这个问题。 谢谢。 最佳答案 第
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 10年前关闭。 Improve this qu
我在joomla中使用youtube视频,其中代码如下:- [jv_youtube url="https://www.youtube.com/watch?v=8Di0IOQssOM&rel=0" wi
我使用 onContentPrepare 事件将此 [test] 更改为其他文本 o prinf html,如 wordpress 短代码,但没有任何变化。 出了什么问题? 这是shortcodejd
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
请先转到www.espacioasir.com,然后注意第二篇文章如何“压碎”到左侧-文章正常宽度的一半。 无论如何,我认为我无法解释得更多,我的问题很清楚:为什么会这样?我确实想提及一下,本文的内容
有些人可能知道,Wordpress 在设置中有一个选项,允许在子目录中安装站点,同时将站点 URL 设为主域。它类似于“站点 url”和“Wordpress url”。我在 Joomla 中寻找类似的
我遇到的这种情况:安装了 joomlaxy/JSPT/Payplans 的 joomla 运行良好。 现在,我在/pages 文件夹中做了一个小的 php 脚本,用于在特定用户类型的模板中使用,它调用
我知道如何为 Joomla 1.6 创建一个模块。但是我听说可以在同一个 XML 安装文件中添加一组 Joomla 1.5 参数和一组 Joomla 1.6 参数,以使只有一个包与 1.6 和 1.5
自从昨晚 Joomla 3.0 Alpha 发布以来,我想尝试开始将我编写的 Joomla 2.5 组件转换为新的 Joomla 3.0。我一直在关注所有的开发小组,他们说 JController、J
我在 Joomla 1.5 中工作并开发了一个组件,该组件有 2 个 View ,在两个 View 中具有相同的部分。我正在重复代码,因为我在 2 个不同的 View 中使用了相同的代码。所以我想知道
我正在构建一个自定义 Joomla 组件,并将其添加到我的模板 (default.php) 文件(它使用 HTTP POST)中的表单中: echo JHTML::_( 'form.token' );
拿起 Joomla 的最快方法是什么?书籍,培训等?我们希望在 Joomla 中培训 10 名中高级 Java 开发人员。 最佳答案 如果你想节省时间,不要从官方的 joomla 文档开始。转至 ht
我之前以这种方式从 Joomla 文章中添加了 Joomla 模块:{loadmodule mod_name}但是这次我需要从中传递参数。 如何将文章中的参数传递给 Joomla 模块? 最佳答案 您
我是一名优秀的程序员,十分优秀!