4

我正在尝试创建一个模板。我在模板文件夹中为模板创建了一个文件夹,还创建了两个文件 index.php 和 templateDetails.xml

我的 index.php 有以下代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >  
<head>  
<jdoc:include type="head" />  
</head> 

<body>

<jdoc:include type="component" />  

</body>
</html>

并且 templateDetails.xml 具有以下代码,是的,我复制了这些代码,因为它是初学者。

<?xml version="1.0" encoding="utf-8"?>  
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN"  
 "http://dev.joomla.org/xml/1.5/template-install.dtd">  
<install version="3.1.5" type="template">  
       <name>template _tut</name>  
       <creationDate>31-01-2009</creationDate>  
        <author>Nettut Fan</author>  
        <authorEmail>your@email.com</authorEmail>  
        <authorUrl>http://www.siteurl.com</authorUrl>  
        <copyright>You 2009</copyright>  
        <license>GNU/GPL</license>  
        <version>1.0.0</version>  
        <description>Template Tut</description>  
        <files>  
                <filename>index.php</filename>  
                <filename>templateDetails.xml</filename>  
                <filename>css/template.css</filename>  
         </files>         


        <positions>  
                <position>breadcrumb</position>  
                <position>left</position>  
                <position>right</position>  
                <position>top</position>  
               <position>user1</position>  
                <position>user2</position>  
                <position>user3</position>  
                <position>user4</position>  
                <position>footer</position>  
        </positions>  
</install>

我的 joomla 版本是 3.1.5,尽管做了上述步骤,我的模板文件夹没有显示在模板管理器中。

4

1 回答 1

2

您需要安装模板才能完全注册它。

有两种方法可以做到这一点:

  1. 下载您的文件,将它们压缩并像安装任何其他扩展程序一样安装它。
  2. 在 Joomla 后端,转到“扩展管理器”,然后转到“发现”。这将检测未安装的扩展,并应将您的模板显示在列表中。检查并安装

希望这可以帮助

于 2013-08-17T07:07:58.143 回答