# vowstag
**Repository Path**: wellwang/vowstag
## Basic Information
- **Project Name**: vowstag
- **Description**: 基于EntityFramwork的代码生成标签。只需知道表结构就能通过标签获取数据,基本不需要编写后端代码。解决不同CMS的标签自成一派的弊端
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 5
- **Created**: 2016-02-24
- **Last Updated**: 2020-12-20
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
| 简介: | vowsTag标签使用说明 |
| 文件结构: |
|
| 概览: |
|
```
** 使用:**
//1.添加引用Tag.Vows.dll
//2.配置
TagConfig __config= new mPaths();
__config.input = "~/temple/"; /*模板文件夹为根目录的/temple/文件夹*/
__config.output = "~/www/"; /*生成文件夹为根目录的/www/文件夹*/
__config.db = new Entities(); /*设置一个 ObjectContext 或 DbSet 的子实例*/
__config.protected_tables = "Manages|Log"; /*设置受保护的表*/
__config.current_pairs = new string[2]{"{#","}"};/*配置标签左右符号 {#....../}
__config.creatScriptForAllPages = true;//为所有页面生成callback支持;
//无需在每个页面中使用{cmd?callback=true/}
__config.defaultBase = "web.hello.pagebase";// 指定所有页面处理类默认继承的类;
//默认为‘Tag.Vows.TagPage’
//可在在具体页面使用{cmd?base=web.hello.pagebase2 /}另行指定
//3.生成页面 /temple/page/test.html
string msg = __config.MakePage("test");
Response.Write(msg);
```
**标签实例:**
1.1列表:不分页
```
{#list=article?classid=3&orderby=tiem&desc=true&take=10}
{#item.title}
{# SubString(item.desc,50)}
{#list}
```
1.2列表:分页
```
{#list=article?classid>3&id<1000&orderby=tiem&desc=true&pzgesize=10}
{#item.title}
{#list}
{#pager?type=cs}
```
1.3列表:字符串包含(搜索)
```
{#list=article?title%request.kwd&take=10&item=search&emptytext=暂无相关记录/}
```
2.1:内容
```
{#read=article?id=10}
{#read.title}
{#read.content}
{#{click()}}
{#read}
```
2.1:内容url参数
```
{#read=article?id=request.id /}
{#read.title}
{#read.content}
{#click(request.id)}
```
3.1:异步json
```
上一页下一页
```