Six months ago, in the blog Park wrote several asp.net cms articles, at that time, is my CMS has not been done out. It's all rhetoric. Now I have deleted that few.
Today, writing this article, is to feel a little bit of emotion.
Now my CMS also the core is almost finished.
Let's say this C # version of the CMS is called: ancms
the basic grammar of Ancms:
1. Binding Data
Copy Code code as follows:
The entire syntax description:
Start Tag <!--{An: Method name filed=[Field 1, Field 2, Field 3] sort=[field Asc|desc] category=[category ID] id=[number ID] keyword=[] page=[true|false] num=[ Paging Display Quantity]}-->
<!--{/an}--> end tag
Case ①
<!--{An:alist Filed=[id,title,time] sort=[time desc]}-->
<p> No.: ${0}, Title: ${1}, Time:${2}</p>
<!--{/an}-->
Where alist represents: a list of articles.
I also wrote some other methods: List,plist,llist ...
plist says: A list of products.
Llist: A list of links.
List: Generic lists (articles, products, links ...) are included)
Filed this is the field name of the database. I believe we all understand.
In subsequent releases, I default the field ID to the first, without having to fill in the
namely:<!--{an:alist filed=[title,time] sort=[time desc]}-->
<p> No.: ${0}, Title: ${1}, Time:${2}</p>
<!--{/an}-->
In which time is often formatted.
So I wrote a method.
<!--{An:alist Filed=[title,time] sort=[time desc]}-->
<p> No.: ${0}, Title: ${1}, Time:${2|yyyy-mm-dd}</p>
<!--{/an}--> believe that we all understand the meaning of time format.
Category is classified as its name suggests. Fill in the category ID.
List of articles with category ID equal to 1 <!--{an:alist Filed=[title,time] category=[1]}--> <p> No.: ${0}, Title: ${1}, Time:${2}</p> <!--{/an}-->
Category Id= #表示从Url获取编号ID <!--{an:alist Filed=[title,time] category=[#]}--> <p> No.: ${0}, Title: ${1}, Time: ${2}</p > <!--{/an}-->
ID ibid.
Page Indicates whether pagination is paginated, default is not paging
Num represents the number displayed per page. The default is 10, and if 0 displays all.
Keyword represents a fuzzy query, which is a keyword search.
Well, that's pretty much the case for binding data.
It's a bit cold this evening. The binding data is written here.
Continue tomorrow night. The implementation of each method, I will post in the subsequent article one by one.
I hope you can communicate with each other. Everyone together to create our own asp.net cms.