}
if (root != null) {
model.addAttribute("root", root);
}
// 栏目
Channel channel = manager.findById(id);
// 当前模板,去除基本路径
int tplPathLength = site.getTplPath().length();
String tplChannel = channel.getTplChannel();
if (!StringUtils.isBlank(tplChannel)) {
tplChannel = tplChannel.substring(tplPathLength);
}
String tplContent = channel.getTplContent();
if (!StringUtils.isBlank(tplContent)) {
tplContent = tplContent.substring(tplPathLength);
}
// 父栏目
Channel parent = channel.getParent();
// 模型
CmsModel m = channel.getModel();
// 栏目列表
List<Channel> topList = manager.getTopList(site.getId(), false);
List<Channel> channelList = Channel.getListForSelect(topList, null,
channel, false);
// 栏目模板列表
List<String> channelTplList = getTplChannel(site, m, channel
.getTplChannel());
// 内容模板列表
List<String> contentTplList = getTplContent(site, m, channel
.getTplContent());
List<CmsGroup> groupList = cmsGroupMng.getList();
// 模型项列表
List<CmsModelItem> itemList = cmsModelItemMng.getList(m.getId(), true,
false);
// 浏览会员组列表、浏览会员组IDS
List<CmsGroup> viewGroups = groupList;
Integer[] viewGroupIds = CmsGroup.fetchIds(channel.getViewGroups());
// 投稿会员组列表
Collection<CmsGroup> contriGroups;
if (parent != null) {
contriGroups = parent.getContriGroups();
} else {
contriGroups = groupList;
}
// 投稿会员组IDS
Integer[] contriGroupIds = CmsGroup.fetchIds(channel.getContriGroups());
// 管理员列表
Collection<CmsUser> users;
if (parent != null) {
users = parent.getUsers();
} else {
users = cmsUserMng.getAdminList(site.getId(), false, false, null);
}
// 管理员IDS
Integer[] userIds = channel.getUserIds();