具有不同键和值保存数据 [英] Saving data with varying keys and values

查看:291
本文介绍了具有不同键和值保存数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要做什么

我想有模板拴,可以有不同量和种类在其内的数据的页面。

I want to have templates tied to a page that can have varying amounts and kinds of data within it.

所以一个模板可以有一个列表或者只是主体内容或特殊的布局。

So template a can have a list or just body content or a special layout.

我要这部分内容是使用create.js前端编辑。所以,网页标题,正文内容,ECT都将是可编辑的,需要的地方(MySQL的),并以某种方式保存。我不想在一个大的所见即所得的编辑器编辑的内容。

I want part of this content to be editable from the frontend using create.js. So the page title, the body content, ect would all be editable and need to be saved somewhere (mysql) and somehow. I do not want the content edited in one big WYSIWYG editor.

类似的功能,但并不完全
字preSS允许通过邮寄元搭售自定义数据到一个职位。

Similar Functionality but not quite Wordpress allows for tying custom data to a post via post meta.

Drupal的定义字段,把它们绑以某种方式节点做到这一点。

Drupal does this by defining fields and tying them to nodes somehow.

我使用CakePHP建立这个网站,但我有一个很难包装我的头围绕如何保存和简单易懂的方式获取这些数据。

I am using cakephp to build this site but I am having a hard time wrapping my head around how to save and retrieve this data in a simple understandable way.

我试图寻找一个解决方案,但我真的不知道我问什么叫做

I have tried searching for a solution but I don't really know exactly what I am asking is called.

因此​​,在总结我使用的蛋糕2.3,create.js(其中有骨干,并强调和VIE)构建可以被保存到数据库中的网页,但有不同数量和款式可编辑区域。这些页将在它们被显示在相同的环境施用

So in summary I am using cake 2.3, create.js (which has backbone and underscore and VIE) to build pages that can be saved to a database but have varying amounts and styles of editable areas. These pages will be administered in the same environment they are displayed.

这里的目标是给终端用户一些编辑而不损害设计。我要求良好的资源,所以我可以进一步研究这个问题。在野外库或这方面的例子将是巨大的。

The goal here is to give the end user some editing without compromising the design. I am asking for good resources so I can research this subject further. Libraries or examples of this in the wild would be great.

类似的问题。
<一href=\"http://stackoverflow.com/questions/11911271/database-structure-and-associations-for-open-ended-data-and-data-types\">Database结构和协会的开放式数据和数据类型

推荐答案

有关CakePHP的这看起来是一个很好的解决方案。

For cakephp this looks to be an excellent solution.

<一个href=\"http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3\" rel=\"nofollow\">http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3

更新版本2.3的蛋糕

<一个href=\"https://github.com/zeroasterisk/CakePHP-Expandable-Plugin/blob/master/Model/Behavior/ExpandableBehavior.php\" rel=\"nofollow\">https://github.com/zeroasterisk/CakePHP-Expandable-Plugin/blob/master/Model/Behavior/ExpandableBehavior.php

这篇关于具有不同键和值保存数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆