joomla创建模板

joomla 模板

使用joomla的自带的图标系统,引入如下

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

使用如下

class 指定图标 同时也可以通过style来指定图标的大小

开发自己的模块需要两个主要的文件

index.php
templateDetails.xml

templateDetails.xml 内容如下

mynewtemplate2018-9-22de0[email protected]http://www.tex.comde0 2018GNU/GPL1.0.2My New Templateindex.phptemplateDetails.xmlimagescssbreadcrumbleftrighttopuser1user2user3user4footer

其中中有两个元素: ,分别定义模块需要引入的文件及子文件夹中的内容;
这个元素:在模板中定义有效的模块位置;也就是在模板中可能需要用的模块位置

index.php 内容如下








    
    





    Custom image



    

其中jdoc:include是一个引用申明,指定模板中其它的输出部分,或者为其它扩展指定位置。
jdoc:include type="modules" name=“top 其指定这里放置模块,并为其配置位置名为top
jdoc:include type="component" 这个是类型指定为组件部分,是模板出的的主要部分。一个模板body标签中只能出一次

转载于:https://blog.51cto.com/quietnight/2280988

你可能感兴趣的:(joomla创建模板)