|
一、公共模板医院A型的bdtype定义如下:
<record id="100" name="hospitalA" chn="医院网A型" stype="dochome" ttype="2"/>
二、在cates.xml中的栏目预定义如下,其中有两个信息栏目;
<record id="10001" name="bulletin" chn="医院公告" ttype="100" stype="article"/> <record id="10002" name="doctors" chn="医院概况" ttype="100" stype="article"/> <record id="10003" name="hstrong" chn="专家介绍" ttype="100" stype="article"/> <record id="10004" name="departs" chn="专科介绍" ttype="100" stype="article"/> <record id="10005" name="news" chn="就医指南" ttype="100" stype="article"/> <record id="10006" name="hmed" chn="热门推介" ttype="100" stype="article"/> <record id="10008" name="hcare" chn="最新技术" ttype="100" stype="article"/> <record id="10010" name="yyxw" chn="医院新闻" ttype="100" stype="article"/> <record id="10011" name="htrial" chn="临床招募" ttype="100" stype="adsinfo"/> <record id="10012" name="hjobs" chn="工作招聘" ttype="100" stype="adsinfo"/>
三、版面结构:
| 公共顶,用fragmentA;(含菜单) |
|
公共左侧;
各页面特色的码在
fragmentB
|
各页面右侧内容区 |
| 公共底,目前使用signature显示基本的签名和联系方式等内容。 |
四、公共菜单;
<div align="left"style="background:url(/dochome/templates/2/images/menuzbg.gif);background-repeat: repeat-x;background-position: left top;height:23px;padding-left:10px;padding-top:8px"> <a href="${self.url}index.html"><strong>首页</strong></a> <cates id="thecate" type="article"> | <a href="${self.url}cates/cate_${thecate.id}.html" target="_blank"><strong>${thecate.chn}</strong></a> </cates> </div> 注意其中的栏目循环,只列出type="article",即文章内容,没有列出其他内容;
五、首页内容方块:
1.首页最上方显示了不分类的全部内容,包括文章类和信息类等;
<list ent="article" id="theart" rows="7" ord="alterdate|desc">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr align="left" valign="middle"> <td style="border-bottom:1px #BDE3BD dotted" height="20" width="85%"><img src="/dochome/templates/2/images/bit1.gif" width="15"><a href="${self.url}articles/article_${theart.id}.html" target="_blank" class="A12x">${theart.topic}</a></td> <td style="border-bottom:1px #BDE3BD dotted" width="15%">${theart.alterdate.[date(format<yyyy-MM-dd>)]}</td> </tr> </table>
</list>
2.中上方选取显示网站简介,网站简介在网站属性中由网站超级管理员编辑:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr style="background:url(/dochome/templates/2/images/lanbg.gif);background-repeat: repeat-x;background-position: left top;"> <td width="74%" height="25" align="left" valign="top"><img src="/dochome/templates/2/images/jj_yy51.gif"></td> <td width="26%"> </td> </tr> <tr> <td height="119" align="left" valign="top">${self.intro} </td> <td align="center" valign="middle"><img src="/dochome/templates/2/images/yyjj.gif" width="180" height="131"></td> </tr> </table>
3.四个内容方法分别选取了医院新闻(yyxw),热门推介(hmed),最新技术(hcare),注意小括号中的name,这是在代码中引用的ID:
例如:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="71%" height="119" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr style="background:url(/dochome/templates/2/images/lanbg.gif);background-repeat: repeat-x;background-position: left top;"> <td width="29%" height="25" align="left" valign="middle"><span class="style2">◆ ${cate.yyxw.chn}</a></td> <td width="71%"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"class="greenborder">
<list cate="yyxw" id="theart" rows="5" ord="alterdate|desc"> <tr align="left" valign="middle"> <td width="71%" style="border-bottom:1px #BDE3BD dotted" height="20"><img src="/dochome/templates/2/images/bit1.gif" width="15" height="9"><a class="A12x" href="${self.url}articles/article_${theart.id}.html">${theart.topic}</a></td> </tr> </list> <tr align="left" valign="middle"> <td height="20"><div align="right"><a href="${self.url}cates/cate_${cate.yyxw.id}.html">更多>>></a></div></td> </tr>
</table>
第四个内容方块选取的是全部医院信息列表:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="71%" height="119" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr style="background:url(/dochome/templates/2/images/lanbg.gif);background-repeat: repeat-x;background-position: left top;"> <td width="29%" height="25" align="left" valign="middle"><span class="style2">◆ 医务信息</span></td> <td width="71%"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"class="greenborder"> <list id="theart" rows="5" ord="alterdate|desc" contentype="adsinfo"> <tr align="left" valign="middle"> <td width="71%" style="border-bottom:1px #BDE3BD dotted" height="20"><img src="/dochome/templates/2/images/bit1.gif" width="15" height="9"><a class="A12x" href="${self.url}articles/article_${theart.id}.html">${theart.topic}</a></td> </tr>
</list> </table> </td> </tr> </table>
与前三个内容方块不同之处,这里直接写明是医务信息(或取任何您喜欢的名称),条件是contentype="adsinfo",并且没有更多。因为,这里实际上是两个信息分栏的并合显示。
|