我是 Joomla 的新手,尝试自己制作一个小组件。 我将网站上的用户重定向到一个 View ,他可以在其中插入一些信息并提交表单。 这个逻辑在某种程度上是有效的,但 Jommla 插入了三个帖子链接,阅读更多内容和另一个链接。我怎样才能阻止 Joomla 添加这个?
我的 View 代码:
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.framework');
JHtml::stylesheet('my-file.css', 'components/com_component/');
echo '<h1>Form</h1>';
?>
<form action="<?php /* Create JRoute*/ ?>" method="post" name="mailForm">
<ul>
<?php foreach($this->form->getFieldset() as $field):
if ($field->label!="") {
echo '<li>'.$field->label.$field->input.'<br/></li>';
} else {
echo '<li>'.$field->input.'</li>';
}?>
<?php endforeach; ?>
</ul>
<div>
<input type="submit" value="Senden!">
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
渲染结果(不是标记为红色的预期链接):
最佳答案
在 JForm 表单的 XML 声明中更新编辑器的条目:
<field name="description" label="Bescheibung" type="editor" />
添加附加属性:
buttons="false"
关于php - Joomla 网站 View 没有 "read more",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18746218/