php - Joomla 网站 View 没有 "read more"

标签 php joomla joomla-component

我是 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>

渲染结果(不是标记为红色的预期链接): enter image description here

最佳答案

在 JForm 表单的 XML 声明中更新编辑器的条目:

<field name="description" label="Bescheibung" type="editor" />

添加附加属性:

 buttons="false"

引用: http://docs.joomla.org/Editor_form_field_type

关于php - Joomla 网站 View 没有 "read more",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18746218/

相关文章:

security - 更改 Joomla 管理员 URL

css - 在模板 CSS 之后或头部关闭标签之前在 Joomla 中添加 CSS

php - Joomla:是否可以在没有 iframe 和插件的情况下显示组件的 View ?

php - 比较不同领域的日期和时间

php - 如何在 Azure 上启用 Zend Guard Loader 扩展 (ZendLoader.dll)?

css - 如何在 Joomla 2.5 模板中组织 css 文件?

joomla - 在数据库中手动注册Joomla 2.5组件

PHP 在 imagecopyresampled 后保存图像

PHP 游戏服务器,多个 TCP 客户端?

css - 如何在我的 Joomla 模板中将 2 个 span6 类堆叠在一起