主题 : 请教下cms.MsgList
级别: 童生
UID: 1599
积分:36 加为好友
威望: 0 精华: 0
主题:2 回复:25
注册时间:2010-01-12
在线时长:0
1#   发表于:2010-01-26 12:41:46  IP:59.70.*.*
这个宏是在action_cms.ftl
<#macro ChnlList id=chnl.id sysType='article' orderBy='0' isDisplay='1' hasContent='0'
linkClass='' linkTarget='0'
isPage='0' count='20' firstResult='0' pageNo=pageNo
style='1' inner='0' isLoop='1' cssClass='' cssStyle='' showLinkStyle='1'
sysTpl='1' sysContent='0' userContent='' sysPage='0' userPage='' upSolution='' upWebRes='' pageClass='' pageStyle='' custom=[]>
<#if inner=='0'>
<#local customs = ''>
<#list custom as s>
<#local customs = customs+s>
<#if s_has_next><#local customs = customs+'|'></#if>
</#list>
<@s.action name='ChnlList' namespace='/jeecms/tag/cms' executeResult='true'
chnlId=id sysType=sysType orderBy=orderBy isDisplay=isDisplay hasContent=hasContent
linkClass=linkClass linkTarget=linkTarget
isPage=isPage count=count firstResult=firstResult pageNo=pageNo
style=style cssClass=cssClass cssStyle=cssStyle showLinkStyle=showLinkStyle
sysTpl=sysTpl sysContent=sysContent userContent=userContent sysPage=sysPage userPage=userPage pageClass=pageClass pageStyle=pageStyle customs=customs
/>
<#else>
<@s.action name='ChnlListInner' namespace='/jeecms/tag/cms' executeResult='false'
chnlId=id sysType=sysType orderBy=orderBy isDisplay=isDisplay hasContent=hasContent
isPage=isPage count=count firstResult=firstResult pageNo=pageNo
/>
<#if isLoop=='1'>
   <#list n_pagination.list as item>
<#nested item,item_index,item_has_next/>
</#list>
<#else>
<#nested n_pagination/>
</#if>
</#if>
</#macro>

n_pagination.list  很费解,n_pagination没有定义啊
<#nested item,item_index,item_has_next/>这又是表示什么意思,这三个变量没用上啊

这个是default 里 index.html
<div class="left_row">
      <div class="list">
        <div class="list_bar">// <a target="_blank" href="${base}/jeecms/Guestbook.jspx">最新留言</a></div>
        <div class="list_content">
        [@cms.MsgList  inner='1' count='5';msg]
          <div class="msg_title">${(msg.member.loginName)!('匿名网友')}:</div>
  <div class="msg_content">
  [#if msg.contentMember?length lte 150 ]
  ${(msg.contentMember)!}
  [#else]
  ${msg.contentMember[0..149]}...
  [/#if]
  </div>
[/@cms.MsgList]
        </div>
      </div>
    </div>

msg哪里来的,freemarker文档里有段nested的例子,表示Msg是作为nested里变量使用
可这里定义的msg和上面那个cms.MsgList不对应啊
级别: 秀才
UID: 2323
积分:87 加为好友
威望: 0 精华: 0
主题:3 回复:73
注册时间:2010-01-26
在线时长:0
2#   发表于:2010-02-05 10:16:34  IP:218.110.*.*
在session,或者request里
级别: 童生
UID: 2994
积分:32 加为好友
威望: 0 精华: 0
主题:1 回复:19
注册时间:2010-02-24
在线时长:0
3#   发表于:2010-03-03 22:31:39  IP:183.85.*.*
n_pagination.list  很费解,n_pagination没有定义啊 
<#nested item,item_index,item_has_next/>这又是表示什么意思,这三个变量没用上啊 
不是直接<#nested />就可以的吗?

费解!顶!!
级别: 白丁
UID: 7569
积分:2 加为好友
威望: 0 精华: 0
主题:0 回复:2
注册时间:2010-06-04
在线时长:0
4#   发表于:2010-06-24 16:07:06  IP:114.74.*.*
奥,这个问题我来回答,我发现楼主估计没有时间,这个你注意分析思路:第一:如果没有定义,就可能是Action返回的全局变量了,因此,你就用这个到所有Action去搜索,MyEclipse很方便搜这个,你就会发现PartBaseAction类是有:INNER_PAGE = "n_pagination",然后呢,你就顺藤摸瓜,去找这个INNER_PAGE,你会发现它的确是在ArtiPartAct等类中被set进contextPvd中了,因此在页面上是可以取到的。 第二:如果你发现某个变量没有定义,你就要像会不是是函数呢,后来我查了下果然是函数,给你拷贝下:
<#list student as stu> 
    ${stu}<br/> 
</#list> 
与jstl循环类似,也可以访问循环的状态 
item_index:当前变量的索引值 
item_has_next:是否存在下一个对象 其中item名称为as后的变量名
因此,一定要注意分析问题的思路,呵呵呵,希望共同进步。
级别: 白丁
UID: 7315
积分:5 加为好友
威望: 0 精华: 0
主题:0 回复:5
注册时间:2010-05-28
在线时长:0
5#   发表于:2010-06-24 20:53:54  IP:119.210.*.*
楼上的思路很清晰!

item,item_index,item_has_next 这三项的含义官方手册说的很明白:
http://freemarker.sourceforge.net/docs/ref_directive_list.html

至于用处嘛,当你把inner==1的时候,你会以以下的方式调用这个Macro:
[@cms.ChnlList ... inner='1';c,i,has_next] 
...
[/@cms.ChnlList]

使用了<#nested item,item_index,item_has_next/>后,按下边的方式一一对应后,你就能自己自定义页面的样式了。
item -> c
item_index -> i
item_has_next  -> has_next
级别: 童生
UID: 98130
积分:24 加为好友
威望: 0 精华: 0
主题:4 回复:3
注册时间:2017-01-07
在线时长:0
6#   发表于:2017-02-26 21:15:45  IP:46.253.*.*
http://surfcasino8.com/serie.php?serie=2842 - Redrum (murder)  Petes.Dragon.2016.1080p.BluRay.x264-BLOW-[rarbg -  Read More 28-09-2016, 08:30 life in peices pipi culotte 7 s3 mp4  
http://qbt-bm.com/deadly-islands-s01e05-devils-island-1080p-web-h264-edhd/ - Deadly Islands S01E05 Devils Island 480p WEB x264
http://3rdeyeassociates.com/load/sport_sport/atletik_barselona_1_2_20_01_2016_obzor_matcha/24-1-0-212 - РђС‚летик - Р‘арселона (1:2) (20.01.2016) РћР±Р·РѕСЂ РњР°С‚ча
 
Alan Vega - Collision Drive - 1981
The Pirate Filmes
Bogan Hunters
Michael Adamthwaite
The Mentalist
 
http://palletfurnituredesign.com/director/list/name/Rob+LaDuca - Rob LaDuca
http://muvolcanus.com/episode/watch-The-Prisoner-online.htm - The Prisoner
http://getonitracing.net/2_Days_1_Night-s1e134-2+Days+%26+1+Night+Episode+134 - 2 Days & 1 Night Season 1 Episode 134 вЂ“ 2 Days & 1 Night Episode 134
http://spargi.com/category/bollywood/ - Bollywood
http://geenadavis.info/il-fuoco-della-giustizia-forsaken/ - Il fuoco della giustizia вЂ“ Forsaken
 
The Phantom Of The Opera - Hammer Horror 1962 Eng Subs 720p [H264-mp4 - 
Superman-Batman 1-68 plus Annuals and vs. Vampires and Werewolve
The Quartermaster Montgomery C Meigs, Lincoln’s General, Master Builder of...
Couple Seeking Teen 21 XXX DVDRip x264 MOFOXXX
Chicago Fire S05E05 HDTV XviD-FUM[ettv - 
级别: 童生
UID: 98130
积分:24 加为好友
威望: 0 精华: 0
主题:4 回复:3
注册时间:2017-01-07
在线时长:0
7#   发表于:2017-02-27 03:24:46  IP:46.253.*.*
http://best-fat-burners-india.com/game-of-thrones-2011-season-4-s04-1080p-bluray-x265-hevc-10bit-aac-7-1-tigole-utr/ - Game of Thrones (2011) S04 (1080p Bluray x265 HEVC 10bit AAC 7 1 Tigole UTR  Cannabis - A Complete Guide (2016) (Pdf) Gooner Movie Information The BFG 2016 720p BRRip x264 AAC-ETRG ???? ???.Once Upon a Time in High School 2004.H264.1080p-HDTV.EBS World.War.Z.(2012).XviD.AC3-ADTRG  
http://wiringmob.us/director/list/name/Evan+Johnson - Evan Johnson
http://fggvm.xyz/serial/531/The-Leftovers - The Leftovers
http://bendlivibility.org//bendlivibility.org/file/5916l094zc863g - Publish2
http://theconversionfunnel.com/le-hobbit-la-bataille-des-cinq-armees.html - Le Hobbit : la Bataille des Cinq ArmГ©es
http://plustravelagency.com/hash/AgusiQ+TorrentS+pl+Stone+2010+PL+J25+AgusiQ/71D9849820FAB1ED58F08DBF184E99388C32CF18 - AgusiQ TorrentS pl Stone 2010 PL J25 AgusiQ
 
Nine to Five 2013 REMASTERED 1980 BDRip x264-VoMiT
the vampire diaries s04e 720p
Animacion
Florence Mezzara,
Eastenders 2013 01 24 HDTV x264 Deadpool
 
http://mutuellemaladie.com/telecharger-phenomenes - PhГ©nomГЁnes (2008)
http://bestacousticguitarreviews.net/watch/americas-supernanny - AMERICA'S SUPERNANNY
 
Naruto Shippuden – Episodio 482 Legendado HD Online
a history of the vietnamese pdf
loadiine wiiu
Alive 1993 HD ????? ????? 7.0
[AnimeRG -  Nanbaka - 07 [Multi-Sub -  [x265 -  [1080p -  [pseudo - 
1 共1页