Kooboo中怎么新增一个关联的Details 动态页面。
Kooboo中怎么新增一个关联的Details 动态页面。
有几个要点:
1. Sub Page的Parent Page 必须是英文书写。如果是中文会出现找不到页面 500错误
2. 要在Page Mapping中设置 url和page的关联
3. page要改成dynamices的。
Dynamic pages I
A dynamic web page is a kind of web page that has been prepared with fresh information (content and/or layout), for each individual viewing.
Kooboo provides two easy ways to create dynamic pages. You can directly add a data folder to a page, create both a content list page and a content detail page. A more advanced way is using view and datarule. Please see below steps.
1. Adding data folder to a page.
Go to Start page of Kooboo CMS, select Add sub page to create a new page.
In the page designer, name the page Article click Add a data folder
The data folder selection windows open, select the folder and check List
Click OK and then click Save to save your page. You have created a new article list page. Next we will create the article detail page.
In the Start page, click on the Article page we just created, select Add sub page and then select the two_column layout
Call this page Detail, and also select the Add a data folder.
Click Ok, then Click Save. We have created the new article list and article detail. Click preview in the dropdown menu to preview them.
Action mapping
If you name the list page name according the content type name and the detail page as a sub page of the list page with the page name of detail, all the page linking will be generated correctly. If you name the page in a different way, Kooboo CMS may not able to generate the link to detail page correctly. If kooboo CMS did not find the destination page, it will record the missing link in the action mapping, you can manually make the adjustment.
Change the default content display template
In the list and detail pages created above, it use the system default display template to display list and detail content. If you wish to change how it is displayed, you can turn on the Custom template and modify it at the content type edit page.
In the database setting page, check Custom template, and click Save
Go to content type edit page, you can see the template tab now.
Click the Templates tab, you can modify the front end site content display template or even content editing page in the CMS backend.
2. Dynamic page with view and data rule
An more advanced way of making dynamic page is to create both list and detail view and then insert the views into corresponding pages. We will continue this topic in the dynamic pages II
Dynamic pages II
This is the second part of creating dynamic pages. In this tutorial, we will show you how you can create dynamic pages using MVC view and Kooboo Data rule.
Go to Views list page, click Create New and select Razor
In the view page, we first need to query content from database in order for view engine to render them. Data query is done by Kooboo Datarule. More information can be found at the Data rule document.
In the view editing page, click Add under the data rule section to create a new data rule.
In the data rule design page, first select the folder that contains the data we need, then select the correct return data type. We selected Article folder with the option of List of contents in the selected folder
Click Next to go to the data query filter design page. Give your datarule a name and define your content filters.
Click Save to save your datarule and return to view editing page. You can now see the datarule you created and also a few icons next to the datarule name. Click on the C# icon will insert the C# code sample to render the Datarule content.
You may modify the generated code. After modification, click Finish to finish the editing. You have created an article list view.
Using similar steps, you can create an article detail view as well. {UserKey} is used as default parameter to query content.
You have created both list and detail view for article folder now. Go to Start page, add two pages, one with the mylistview view, and the other add the mydetailview.
Action mapping
Same as adding a data folder to a page, you may want to check the Action mapping menu if there is a not a immediately link directly to detail page.
You have created the dynamic pages with view and kooboo datarule. You may now go to Start page and preview what you have made.
Merge fields
The following fields are merge fields:
- Content title
- All the fields on the "Html meta" tab on page editing form.
The merge fields used to merge the formulas with the view data in the page. For example, if you setting the "Content title" as a value is "{News.Title}", the field will be rendered as same as "ViewBag.News.Title" which code write by C#.
Kooboo中怎么新增一个关联的Details 动态页面。的更多相关文章
- session中删除数组中的某一个值 - 购物车例子 - jsp
这篇随笔简单的讲一下在session中移除数组中的某一项内容,比如这里有一个购物车其中有两件商品,需要移除其中洗发水这一件商品. 其实在这个session对象中存储了一个数组,在订购页面时选择商品加入 ...
- [转]在NopCommerce中新增一个Domain Model的步骤
本文转自:http://www.cnblogs.com/aneasystone/archive/2012/08/27/2659183.html 在NopCommerce中新增一个Domain Mode ...
- UI中新增一个右击按钮的过程
1.首先给出增加之后的成品 点击后的界面 3.需要增加的部分 新增一个类:DiglogAddUser 用于操作用户填写的数据,写入数据库等操作 3.1首先在资源文件中定义窗口代号 3.2 枚举出该代 ...
- 【转载】C#如何往DataTable中新增一个数据列
在C#中的Datatable数据变量的操作过程中,有时候我们需要往现有的DataTable中新增一个自定义数据列,该列在原有的DataTable变量中并不存在,属于用户手工自定义新增的数据列,在往Da ...
- WPF4.5 中的新增功能和增强功能的信息
本主题包含有关 Windows Presentation Foundation (WPF) 版本 4.5 中的新增功能和增强功能的信息. 本主题包含以下各节: 功能区控件 改善性能,当显示大时设置分组 ...
- 详解MongoDB中的多表关联查询($lookup)
一. 聚合框架 聚合框架是MongoDB的高级查询语言,它允许我们通过转换和合并多个文档中的数据来生成新的单个文档中不存在的信息. 聚合管道操作主要包含下面几个部分: 命令 功能描述 $projec ...
- Android Handler机制 (一个Thead中可以建立多个Hander,通过msg.target保证MessageQueue中的每个msg交由发送message的handler进行处理 ,但是 每个线程中最多只有一个Looper,肯定也就一个MessageQuque)
转载自http://blog.csdn.net/stonecao/article/details/6417364 在android中提供了一种异步回调机制Handler,使用它,我们可以在完成一个很长 ...
- 详解MongoDB中的多表关联查询($lookup) (转)
一. 聚合框架 聚合框架是MongoDB的高级查询语言,它允许我们通过转换和合并多个文档中的数据来生成新的单个文档中不存在的信息. 聚合管道操作主要包含下面几个部分: 命令 功能描述 $projec ...
- android开发之在activity中控制另一个activity的UI更新
转自:http://blog.csdn.net/jason0539/article/details/18075293 第一种方法: 遇到一个问题,需要在一个activity中控制另一个acitivit ...
随机推荐
- STM32之触摸屏
一.触摸屏控制器简介 1.TSC2046概貌 2.TSC2046引脚描述 3.TSC2046应用电路 4.常见接线方法 YU=Y- YD=Y+ XL=X- XR=X+ 二.TSC2046编程注意事项 ...
- 我的第一个BAE python应用
第一步 用baidu帐号登陆开发者中心 http://developer.baidu.com/ Baidu的引导,帮助说明已经很详细, 这里不重复. 第二步,创建新版本 用svn check out ...
- pair work-Elevator Schedule
编程人员:周敏轩 192 周萱 149 1 有关结对编程的思考 结对编程技术是指两位程序员肩并肩地坐在同一台电脑前合作完成同一个设计.同一个算法.同一段代码或同一组测试.通过这次的结对编程练习我结识了 ...
- 使用Sass预定义一些常用的样式,非常方便(转)
SS预处理技术现在已经非常成熟,比较流行的有Less,Sass,Stylus,在开发过程中提升我们的工作效率,缩短开发时间,方便管理和维护代码,可以根据自己的喜好选择一款自己喜欢的工具开发,使用很接近 ...
- MySql排序性能对比
- HDU4535+公式
错排公式. 用64位! /* */ #include<stdio.h> #include<string.h> #include<stdlib.h> #include ...
- Android ListView(Selector 背景图片 全选 Checkbox等按钮)
list_item.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xm ...
- easyui源码翻译1.32--MenuButton(菜单按钮)
前言 扩展自$.fn.linkbutton.defaults.使用$.fn.menubutton.defaults重写默认值对象..下载该插件翻译源码 菜单按钮是下拉菜单的一部分.它伴随着linkbu ...
- DHTMLX 前端框架 建立你的一个应用程序 教程(八)-- 添加表单Form
添加表单Form 我们下一步是在页面中添加一个表单,表格中的选中字段将会显示在表单中.提供一个提交按钮 可以对显示的数据进行修改提交. 添加表单到布局单元格中 1.在右侧布局中使用attachForm ...
- 基于Qt5.x的QCA加解密开源项目的编译过程
记录一下Qt5.x下的QCA的编译过程 需要注意的几点 针对windows环境 1.编译QCA源码前,必须先安装openssl二进制文件 2.需要安装好vs2008等 ( 64-bit Visual ...