主题 : 关于标签里面的键值对????在线等·····
级别: 白丁
UID: 14096
积分:9 加为好友
威望: 0 精华: 0
主题:0 回复:9
注册时间:2011-01-05
在线时长:0
1#   发表于:2011-03-10 16:06:11  IP:123.240.*.*
比如说:[@cms_content_list typeId='3' styleList='3-1' titLen='20' count='5' flashWidth='280' flashHeight='200' textHeight='20' channelOption='1' tpl='2'/]
这里面的数据 比如titLen='20'  什么意思 有什么作用 在哪里用到过??我看content类里没有呢
谢谢
级别: 童生
UID: 10739
积分:3 加为好友
威望: 0 精华: 0
主题:0 回复:3
注册时间:2010-09-08
在线时长:0
2#   发表于:2011-03-10 16:10:49  IP:59.245.*.*
标题长度,很多属性都是通用的。
级别: 白丁
UID: 14096
积分:9 加为好友
威望: 0 精华: 0
主题:0 回复:9
注册时间:2011-01-05
在线时长:0
3#   发表于:2011-03-10 16:13:52  IP:123.240.*.*
ContentListDirective类:
public void execute(Environment env, Map params, TemplateModel[] loopVars,
TemplateDirectiveBody body) throws TemplateException, IOException {
CmsSite site = FrontUtils.getSite(env);
List<Content> list = getList(params, env);

Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
params);
paramWrap.put(OUT_LIST, DEFAULT_WRAPPER.wrap(list));
Map<String, TemplateModel> origMap = DirectiveUtils
.addParamsToVariable(env, paramWrap);
InvokeType type = DirectiveUtils.getInvokeType(params);
String listStyle = DirectiveUtils.getString(PARAM_STYLE_LIST, params);
if (InvokeType.sysDefined == type) {
if (StringUtils.isBlank(listStyle)) {
throw new ParamsRequiredException(PARAM_STYLE_LIST);
}
env.include(TPL_STYLE_LIST + listStyle + TPL_SUFFIX, UTF8, true);
} else if (InvokeType.userDefined == type) {
if (StringUtils.isBlank(listStyle)) {
throw new ParamsRequiredException(PARAM_STYLE_LIST);
}
FrontUtils.includeTpl(TPL_STYLE_LIST, site, env);
} else if (InvokeType.custom == type) {
FrontUtils.includeTpl(TPL_NAME, site, params, env);
} else if (InvokeType.body == type) {
body.render(env.getOut());
} else {
throw new RuntimeException("invoke type not handled: " + type);
}
DirectiveUtils.removeParamsFromVariable(env, paramWrap, origMap);
}
方法里的Environment env是什么 包含哪些值啊?和[@cms_content_list typeId='3' styleList='3-1' titLen='20' count='5' flashWidth='280' flashHeight='200' textHeight='20' channelOption='1' tpl='2'/]有什么关系???
级别: 童生
UID: 10739
积分:3 加为好友
威望: 0 精华: 0
主题:0 回复:3
注册时间:2010-09-08
在线时长:0
4#   发表于:2011-03-10 16:26:00  IP:59.245.*.*
关于开发您可以去看看http://bbs.jeecms.com/fzjy/5349.htm
1 共1页