火星文 技术研习社

Noname Cat, Keep Thinking
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

CMS notes

Posted on 2006-09-14 07:31  剑廿三  阅读(350)  评论(0编辑  收藏  举报
1.  统一的登录入口
2.  Castle ActiveRecord  + NVelocity

pagination by NHibernate Criteria

3.  vm:

add $Page object or $Catalog object or $Article object into vm context, objects all with different properties.

1) inner content

#1

$photo
$name
$address
$telephone
$note

#2

..........

2) outer content

$header
$style
$innerContent
$bottom
$keyControl
$goback

3) catalog

$header
$style

<table border=1>
#foreach( $article in $articleList ) 
<tr>
<td>$article.Name</td>
<td>$article.Url</td>
</tr>
#end
</table>

$Page.frontpage
$Page.nextpage
$Page.prevpage
$Page.endpage

$bottom
$keyControl
$Page.goback

4) front page

$Page.goback

4. generate html

while pagination not finish do output html file, with links of frontpage, prevpage, nextpage, endpage

5. html file path arragement 

channel path like url, eg.

info.canteen.teenho.teemall.western
info.canteen.leewan.pekingroad.cantonese
info.shabercake.style_a
info.shabermooncake.style_cd
info.news.sinanews

background.gif

index.xxx

detail_1.xxx
detail_2.xxx

catalog_1.xxx
catalog_2.xxx

6. try code attribute --> for dynamic business object presentation

<tr>
#foreach $title in $objAttributes
<td>$title.Name</td>
#end
</tr>

$objects

7. choice jsp/aspx/htm as file extension name

8. vm template storage stratege

1) template and channel is many-to-many relationship

a channel can have more than one template, a template can work for many channels

2) used template stores in a column behind article content in article table, with a boolean tag declare that the template is user-defined (user modified when edit article) or not. So when template itself updated, the non-user-defined template stored in article table will be updated at the same time.