首頁面常見指標(biāo)_第1頁
首頁面常見指標(biāo)_第2頁
首頁面常見指標(biāo)_第3頁
首頁面常見指標(biāo)_第4頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、1 首頁面常見指標(biāo)1.1導(dǎo)航菜單基本寫法:#foreach($channel in $cms.getTopChildren($rootChannel)<a href="$cms.getUrl($channel)" id="par$i">$channel.title</a>#end有的時(shí)候點(diǎn)欄目名時(shí)如果有子欄目會(huì)直接跳到子欄目。這個(gè)時(shí)候需要判斷是否有子欄目#foreach($channel in $cms.getTopChildren($rootChannel)#set($count=$cms.getChannelCount($ch

2、annel.ID) #if($count=0)<a href="$cms.getUrl($channel)" >$channel.title</a>#else#foreach($channel1 in $cms.getChildren($channel,0,1)<a href="$cms.getUrl($channel1)">$channel.title</a>#end #end #end1.2文章列表1.2.1帶發(fā)布日期首頁列表循環(huán)取工作動(dòng)態(tài) 欄目下的前5條最新文章,顯示文章的標(biāo)題及日期#foreach(

3、$article in $cms.getContents("工作動(dòng)態(tài)",5)<li><span>$cms.format($article.publishDate)</span><a href="$cms.getUrl($article)">#summary($ 20)</a></li> #end1.2.2普通首頁列表#foreach($article in $cms.getContents("通知公告",5)<li><a

4、href="$cms.getUrl($article)">#summary($ 20)</a></li>#end1.2.3文章相關(guān)圖片列表#foreach($article in $cms.getContents("圖片展示",20)<li><a href="$cms.getUrl($article)"><img src="$cms.getPictureUrl($article)" border="0" />

5、;</a></li>#end1.3首頁圖片幻燈片<SCRIPT type=text/javascript>var imgUrl=new Array();var imgLink=new Array();var imgName=new Array();var n=1;#foreach($article in $cms.getContents("圖片新聞", 200)#if ($cms.hasPicture($article)imgUrln = "$cms.getPictureUrl($article)"imgLinkn =

6、 "$cms.getUrl($article)"var vTitle='$'if (vTitle.length>15)vTitle=vTitle.substring(0,15)+"."imgNamen = vTitle;n+;#end#endvar texts = ""var links = ""var pics = ""var count=1;for(var h=1; h<n; h+) if (count>6)break;if (img

7、Urlh !="") && (imgLinkh !="") && (imgUrlh.indexOf(".jpg") > 0)if (imgNameh.length > 20)imgNameh = imgNameh.substring(0, 20) + "."texts += imgNameh + "|"links += imgLinkh + "|"pics += imgUrlh + "|"count+;texts

8、 = texts.substring(0, texts.length-1);links = links.substring(0, links.length-1);pics = pics.substring(0, pics.length-1);var focus_width=290var focus_height=215var text_height=30var swf_height = focus_height+text_heightdocument.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553

9、540000" codebase=" width="'+ focus_width +'" height="'+ swf_height +'">');document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><p

10、aram name="quality" value="high" ><param name="bgcolor" value= "#fff">');document.write('<param name="menu" value="false"><param name=wmode value="opaque">');document.write('<param name=&quo

11、t;FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');document.write('<embed src="images/focus.sw

12、f" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#fff"

13、; quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" />'); document.write('</object>'); </SCRIPT>1.4友情鏈接

14、<select name="m1" class="select2" ><option selected>-院系-</option>#foreach($article in $cms.getContents("院系",20) <option value="$cms.getUrl($article)">$</option>#end</select><SCRIPT language=vbs>sub m1_oncha

15、nge()if m1.value<>"#" thenwindow.open m1.value,""end ifend sub</SCRIPT>1.5搜索代碼<form name="dataForm" action="/cms/search/searchResults.jsp" target="_blank" method="post"><input name="siteID" size="4"

16、value="$curChannel.site.ID" type = "hidden"><input name="query" type="text" class="input1"><input type="image" src="/pub/test/images/sumbit.gif" width="53" height="22" /></form>1.6欄目列表#foreach($channel in $cms.getChil

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論