Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在joomla中的模块内创建模块_Php_Joomla - Fatal编程技术网

Php 如何在joomla中的模块内创建模块

Php 如何在joomla中的模块内创建模块,php,joomla,Php,Joomla,我想在页脚中添加4个模块。在index.php中添加代码之后 <?php if ($view->containsModules('footer1','footer2','footer3')) : ?> <?php echo $view->positions(array('footer1' => 33, 'footer2' => 33, 'footer3' => 34), 'pkt-nostyle'); ?>

我想在页脚中添加4个模块。在index.php中添加代码之后

<?php if ($view->containsModules('footer1','footer2','footer3')) : ?>
                <?php echo $view->positions(array('footer1' => 33, 'footer2' => 33, 'footer3' => 34), 'pkt-nostyle'); ?>
                <?php endif; ?>

我的模块如下所示:

(对不起,我不能在这里发布img,因为我没有足够的声誉)

但我希望我的模块是这样的:


有人帮忙吗??我将在templateDetails.xml和其他文件中放入其他必要的代码。我只是不知道如何在一列中创建两行。任何形式的帮助都将不胜感激。谢谢。

您需要使用如下代码在模板的index.php中包含四个模块位置:

<jdoc:include type="modules" name="name of module position" style="xhtml" />

然后将模块添加到相应的位置

<div>
    <div class="mod1 mod side">1</div>
    <div class="mod2 mod side">2</div>
    <div class="container mod side">
    <div class="mod3 mod">3</div>
    <div class="mod4 mod">4</div>
    </div>
</div>
.mod{
    width:100px;
    height:100px;
    border: 1px solid dimgrey;
}
.side {
    float:left;
}
.mod3{
    height:48px;
}
.mod4{
    height:48px;
}