【问题标题】:Joomla Core Bootstrap is not working Joomla 3.0 siteJoomla Core Bootstrap 不工作 Joomla 3.0 网站
【发布时间】:2015-01-03 11:00:01
【问题描述】:

我正在尝试在我的前端视图(组件)中实现 Bootstrap。

但这对我不起作用。

路径组件/com_helloworld/views/helloworlds/tmpl/default.php

这里是代码

<?php JHtml::_('behavior.framework'); ?>

<div class="container">

<table class="table table-striped">
    <thead>
        <tr>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>Email</th>
            <th>Phone</th>
            <th>Adress</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>John</td>
            <td>Lee</td>
            <td>johnlee@gmail.com.com</td>
            <td>899888777887</td>
            <td>SNR</td>
        </tr>
    </tbody>
</table>

【问题讨论】:

  • 嗨!一段时间以来,Joomla 拥有自己的 StackExchange 站点:joomla.stackexchange.com。我建议你在那里问你未来的joomla相关问题。

标签: twitter-bootstrap joomla joomla3.0


【解决方案1】:

我相信JHtml::_('behavior.framework'); 用于已弃用的 Mootools 框架。

改用JHtml::_('bootstrap.framework');

请注意,这仅适用于 javascript 框架。 如果你想要css,试试:

$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl . '/media/jui/css/bootstrap.min.css');

(注意可能有更简洁的方法来添加它。)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-02
    • 2013-11-03
    • 2011-06-24
    相关资源
    最近更新 更多