Joomla模块未显示在自定义模板上

问题描述 投票:0回答:1

因此,我最近创建了一个自定义模板,并将其放入模块中并将其上传到我的服务器。当我加载页面时,它会显示模板布局,但是当我创建一个要插入模块位置的模块时,这些模块中的内容不会出现在我的页面上。我似乎可以找到错误的来源。有人可以帮我吗?

Php

<?php defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<!doctype HTML public "-//W3C//DTD HTML 5.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml" 
   xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
  <head>

    <jdoc:include type="head" />

    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
        integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

    <!-- custom css -->
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style.css">

    <title>Site</title>
</head>

<body>
    <!-- navbar area -->
    <div class="nav-area">
        <!-- top details -->

        <!-- navbar menu -->
        <nav class="navbar navbar-expand-lg navbar-light bg-light w-100">
            <div class="container">
                <a class="navbar-brand" href=".">Brand</a>
                <button class="navbar-toggler" type="button" data-toggle="collapse"
                    data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
                    aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <jdoc:include type="module" name="menu" />
                </div>
                <button class="btn btn-orange btn-lg">Request a Qoute</button>
            </div>
        </nav>
    </div>

    <!-- component -->
    <div class="component-area">
        <div class="container">
            <jdoc:include type="component" />
        </div>
    </div>

    <!-- call to action -->
    <div class="call">
        <jdoc:include type="module" name="call2action" />
    </div>

    <!-- what drives us -->
    <div class="drive">
        <jdoc:include type="module" name="drive" />
    </div>

    <!-- our experience -->
    <div class="experience">
        <jdoc:include type="module" name="experience" />
    </div>

    <!-- solutions we offer -->
    <div class="solutions">
        <jdoc:include type="module" name="solutions" />
    </div>

    <!-- call out -->
    <div class="callout">
        <jdoc:include type="module" name="call-out" />
    </div>

    <!-- contact area -->
    <div class="contact">
        <jdoc:include type="module" name="contact" />
    </div>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous">
    </script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
    </script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
        integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous">
    </script>

    <script type="text/javascript">
        $.noConflict();
        jQuery(document).ready(function ($) {
            // Code that uses jQuery's $ can follow here.

            var s = $(".nav-area");
            var pos = s.position();
            $(window).on('scroll', function () {
                var windowpos = $(window).scrollTop() > 1;
                if (windowpos > pos.top) {
                    s.addClass("fixed");
                } else {
                    s.removeClass("fixed");
                }
            });
        });
    </script>
</body>

</html>

templateDetails

<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="template">
    <name>Site</name>
    <creationDate>2020-02-06</creationDate>
    <author>Me</author>
    <authorEmail>[email protected]</authorEmail>
    <authorUrl>site.co</authorUrl>
    <copyright>Site</copyright>
    <license>GNU/GPL</license>
    <version>1.1.2</version>
    <description>Site</description>
    <files>
        <filename>index.html</filename>
        <filename>index.php</filename>
        <filename>templateDetails.xml</filename>
        <folder>css</folder>
        <folder>img</folder>
    </files>
    <positions>
        <position>menu</position>
        <position>call2action</position>
        <position>drive</position>
        <position>experience</position>
        <position>solutions</position>
        <position>call-out</position>
        <position>contact</position>
    </positions>
     <config>
        <fields name="params">
            <fieldset name="general" label="General">
                <field name="copyright" type="text" label="Copyright Info" description="Enter your Copyright Information" />
            </fieldset>
        </fields>
    </config>
</extension>
php html joomla
1个回答
0
投票

错误是我的jdoc类型。而不是<jdoc:include type="module" name="menu" />, its supposed to be```。它缺少's'

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.