joomla 模板
創(chuàng)新互聯(lián)公司是專業(yè)的武義網(wǎng)站建設(shè)公司,武義接單;提供成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作,網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行武義網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!
使用joomla的自帶的圖標(biāo)系統(tǒng),引入如下
$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl.'/media/jui/css/icomoon.css');
使用如下
<span class="icon-joomla" style="font-size:24px;"> </span>
class 指定圖標(biāo) 同時(shí)也可以通過style來指定圖標(biāo)的大小
開發(fā)自己的模塊需要兩個(gè)主要的文件
index.php
templateDetails.xml
templateDetails.xml 內(nèi)容如下
<?xml version="1.0" encoding="utf-8"?>?
<extension version="3.8" type="template">?
<name>mynewtemplate</name>?
<creationDate>2018-9-22</creationDate>?
<author>de0</author>?
<authorEmail>deest@gmail.com</authorEmail>?
<authorUrl>http://www.tex.com</authorUrl>?
<copyright>de0 2018</copyright>?
<license>GNU/GPL</license>?
<version>1.0.2</version>?
<description>My New Template</description>?
<files>?
<filename>index.php</filename>?
<filename>templateDetails.xml</filename>?
<folder>images</folder>?
<folder>css</folder>?
</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>?
</extension>
其中<files>中有兩個(gè)元素: <filename>與 <folder>,分別定義模塊需要引入的文件及子文件夾中的內(nèi)容;
而<positions>這個(gè)元素:在模板中定義有效的模塊位置;也就是在模板中可能需要用的模塊位置
index.php 內(nèi)容如下
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>?
<!DOCTYPE html>?
<html xmlns="http://www.w3.org/1999/xhtml"? xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >?
<head>?
<jdoc:include type="head" />?
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />?
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />?
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />?
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/styles.css" type="text/css" />?
</head>?
<body>?
<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/images/cte.png" alt="Custom image" class="customImage" />???
<jdoc:include type="modules" name="top" />?
<jdoc:include type="component" />?
<jdoc:include type="modules" name="footer" />?
</body>?
</html>
其中jdoc:include是一個(gè)引用申明,指定模板中其它的輸出部分,或者為其它擴(kuò)展指定位置。
jdoc:include type="modules" name=“top 其指定這里放置模塊,并為其配置位置名為top
jdoc:include type="component" 這個(gè)是類型指定為組件部分,是模板出的的主要部分。一個(gè)模板body標(biāo)簽中只能出一次
?
分享名稱:joomla創(chuàng)建模板
文章出自:http://muchs.cn/article8/ihecop.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供、網(wǎng)站制作、自適應(yīng)網(wǎng)站、網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)、服務(wù)器托管
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)