【问题标题】:Frontend editor in joomla 3 does not load the assigned positionjoomla 3中的前端编辑器不加载分配的位置
【发布时间】:2015-06-08 22:50:07
【问题描述】:

好吧,我在 joomla 3.4 中使用了新功能 frontend 编辑器,并且可以很好地使用单个模板(protostar - 默认)。

我需要在我的网站上使用多个模板。然后复制protostar模板,删除我不需要的和protostar2名字,随便打个调用位置position-80即可。

模板 protostar2

Index.php

<?php

defined('_JEXEC') or die;


?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <jdoc:include type="head" />
    <link rel="stylesheet"  href="http://j2.travelsolution.mx/templates/protostar/css/template.css" type="text/css" />
    <script src="http://j2.travelsolution.mx/templates/protostar/js/template.js" type="text/javascript"></script>


</head>

<body class="site ">


    <div class="body">
        <div class="container">



            <div class="row-fluid">

                <main id="content" role="main" >
                    <jdoc:include type="component" />
                    <jdoc:include type="modules" name="position-80" />

                </main>

            </div>
        </div>
    </div>

</body>
</html>

templateDetails.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/2.5/template-install.dtd">
<extension version="3.1" type="template" client="site">
    <name>protostar2</name>
    <version>1.0</version>
    <creationDate>4/30/2012</creationDate>
    <author>Kyle Ledbetter</author>
    <authorEmail>admin@joomla.org</authorEmail>
    <copyright>Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.</copyright>
    <description>TPL_PROTOSTAR2_XML_DESCRIPTION</description>
    <files>
        <folder>css</folder>    
        <folder>js</folder>
        <filename>index.php</filename>
        <filename>templateDetails.xml</filename>

    </files>
    <positions>
        <position>position-80</position>
    </positions>

</extension>

当我从前端修改模块时,一切正常,除了位置部分仅加载 protostar 的位置,而不出现 protostar2 position-80。现在,如果我从后端更改模块(位置 80),它可以完美运行。这里是picture

简而言之。 我有 2 个模板:protostar(默认)和 protostar2。 我创建了一个菜单 (m2) 并分配了 protostar2,然后我做了我的模块并分配了 position-80。从前端加载而不是位置 I-80 进行编辑

我需要什么地方来加载正确的位置?

【问题讨论】:

    标签: php joomla joomla3.0 joomla-extensions


    【解决方案1】:

    我在第 110 行找到了编辑文件 default.php 的解决方案我评论:

    //echo $this->loadTemplate('positions');
    

    这不会加载职位并解决了我的问题。 该文件分配在 YOUR_PATH_SITE\components\com_config\view\modules\tmpl\default.php

    【讨论】:

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