闲话少说,先操作一遍,再给出解释。
1、把模板(本文以siteground-j15-41为例)复制到另外的目录,连同templates\system目录一起复制过去
目录如下:
-模板学习目录
-siteground-j15-41
-system
用dreamweaver打开siteground-j15-41\index.php,
修改头部的css链接路径:
原文如下
1:
<
link
rel
="stylesheet"
href
="templates/system/css/system.css"
type
="text/css"
/>
2:
<
link
rel
="stylesheet"
href="
templates/&
lt;?
php
echo $
this-
>template ?
>/css/template.css" type="text/css"
/>
3:
<!--[if lte IE 7]>
4:
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/ie7.css" type="text/css" />
5:
<![endif]-->
修改后如下(由于我使用的是ie7,所以直接把ie7.css加进来了)
1:
<
link
rel
="stylesheet"
href
="../system/css/system.css"
type
="text/css"
/>
2:
<
link
rel
="stylesheet"
href
="css/template.css"
type
="text/css"
/>
3:
<
link
rel
="stylesheet"
href
="css/ie7.css"
type
="text/css"
/>
这个时候就可以在dw里面看到模板的雏形了。
光标放到<div id="search">一行,可以在下面预览中看到框起来的部分。
通过看代码,该div中包含了<jdoc:include type="modules" name="
user4" />一句,实际运行起来之后,这里是一个搜索框,
该搜索框是怎样产生的呢,"user4“这个名称到底指向哪里呢?
通过观察,在后台发现,
在模块管理的第2页,可以看到有一个search模块,其位置参数值为
user4,好了,这下我们知道这个搜索框是通过插件来了,同样的话,如果我们需要在页面中显示其他内容,就可以按照类似的方式插入插件了。
呵呵!是不是挺简单!
转载于:https://blog.51cto.com/happydagui2222/133801