<![CDATA[ tutorial:如何安装模板 - MODX Community Forums]]> https://forums.modx.com/thread/?thread=51158 <![CDATA[Re: tutorial:&#22914;&#20309;&#23433;&#35013;&#27169;&#26495;]]> https://forums.modx.com/thread/51158/tutorial#dis-post-300246 nonews Oct 21, 2008, 04:26 AM https://forums.modx.com/thread/51158/tutorial#dis-post-300246 <![CDATA[Re: tutorial:&#22914;&#20309;&#23433;&#35013;&#27169;&#26495;]]> https://forums.modx.com/thread/51158/tutorial#dis-post-300245
希望多发一些插件系统如Ditto,wayfinder方面的教程。]]>
winsteps Dec 16, 2007, 03:43 AM https://forums.modx.com/thread/51158/tutorial#dis-post-300245
<![CDATA[tutorial:&#22914;&#20309;&#23433;&#35013;&#27169;&#26495;]]> https://forums.modx.com/thread/51158/tutorial#dis-post-300244 1:上传资源到文件夹assets/templates/*****/modx.css" /!*****就是你的CSS等资源文件的位置。
2:进入:资源/管理资源 --模板 * 建立新模板“。然后在页面中输入模板代码/
比如:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<base href="[(site_url)]" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="[(site_url)][~11~]" />
<link title="Trend" rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/default/fashion-modx-clear.css" />
<script src="manager/media/script/scriptaculous/scriptaculous.js" type="text/javascript"></script>
</head>
<body>
<div id="wrap">
  <div id="header">
    <div id="title">
      <h1><a href="[~[(site_start)]~]">[(site_name)]</a></h1>
      <p id="slogan">{{slogan}}</p>
    </div>
    <h2 class="hide">Main menu</h2>
    <div id="mainmenu">[!Wayfinder?startId=`0` &hereClass=`current` &level=`1` &outerClass=`topnav`!]</div>
    <div class="clear"></div>
  </div>
  <div id="leftside">
    <div id="lmenu" style="display: none;">
      <h2>Menu</h2>
      [!Wayfinder?startId=`0` &hereClass=`` &selfClass=`current` &outerClass=`sidemenu`!]
    </div>
    <h2>Search</h2>
    [[AjaxSearch? &AS_landing=`8` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`]]
    <h2>News</h2>
    [[Ditto? &startID=`2` &summarize=`1` &total=`1` &commentschunk=`Comments` &tpl=`nl_sidebar` &showarch=`0` &truncLen=`100` &truncSplit=`0`]]
    <h2>Login</h2>
    <div id="sidebarlogin">[!WebLogin? &tpl=`FormLogin` &loginhomeid=`[(site_start)]`!]</div>
    <h2>Styles</h2>
    {{styles}} </div>
  <div id="contentwide">
    <h2>[*longtitle*]</h2>
    [*#content*] </div>
  <div id="footer">
   </div>
</div>
</body>
</html>



其中注意:charset= 的设置,一般你的后台语言系统是什么就设置是什么。
另外<link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/*****/modx.css" />的设置!*****就是你的CSS等资源文件的位置。
保存好这些,就可在编辑文档的时候使用这个模板了,
一般情况下 ,你可能需要整个站点都采取这个模板,那请到”工具/配制/系统配制/站点/“下面的默认模板里设置就可以了。

]]>
leepoooo Jan 18, 2007, 07:11 PM https://forums.modx.com/thread/51158/tutorial#dis-post-300244