File:cn/content-catalog.htm
Method:query.map(columns,*where,*order)
'and' 附近有语法错误。 select top 1 CatalogName,PageStyle FROM cocatalog WHERE PageName = 'News' and
数据库执行错误
cn/xmls/news.xmls
...apcat=@querycat.map(['CatalogName,PageStyle'],['{*PageName =} and {*AreaId = $shell.getData(cn)}']);
$if(@Mapcat){
$shell[@Mapcat[PageStyle]]=1;
@CatalogName=@Mapcat[CatalogName];
}
$else{
@CatalogName=新闻列表;
}
$shell[Title]=$join(@CatalogName,-,$shell.getData(metaTitle));
$shell.put(@Mapcat);
$return($empty);
}

//动态标题
$sub startContent(){
@querycontent=$query(content,content);
@ContentId=$argv(0,0);
@querycontent[ContentId]=@ContentId;
@Title=@querycontent.scalar(Title,Content
Id={*ContentId});
$shell[Title]=$join(@Title,-,$shell.getData(metaTitle));
$return($empty);
}

//正文
$sub contentView(PageName){
@querynew=$query(content,content);
@querycat=$query(catalog,content);
@querycat[PageName]=@PageName;
@CatalogId=@querycat.scalar(['CatalogId'],['{*PageName =} and {*AreaId = $shell.getData(cn)}']);
@querynew[CatalogId]=@CatalogId;
@Body=@querynew.scalar(Body,['Status>0 and {*AreaId = $shell.getData(cn)} and {*CatalogId =}']);
$if(!@Body){
@Body=no data;
}...