【发布时间】:2013-12-05 20:15:15
【问题描述】:
我打算使用 drupal 为我们公司的网站存储一些 JSON 内容。因此,我们不必在动态 Web 项目中对字符串进行硬编码,我们可以在 drupal 中更改字符串并发布最终将显示在站点中的内容。
图像也是如此。我们想将图像存储在 drupal 中,站点将从那里检索图像。并且更改 drupal CMS 中的图像会改变网站的外观。
问题: 我安装了drupal,在顶部的内容页面中我找不到发布json内容的方法,我如何获取可以CURL获取内容的URI?
或者drupal 只用于创建网站?而不是通用内容?
我要存储的内容示例如下:
{
"Login_Page": {
"Header": "Indeed, It's the most wonderful time of the year. Text comes from cms",
"Title_Small": "Get the best deals for the holiday season.",
"features": {
"list": [
{
"value": "Customizable, smart items.",
"image": "http://image/coming/from/cms.jpg"
},
{
"value": "Device Monitoring software",
"image": "http://image/coming/from/cms.jpg"
},
{
"value": "Internet of things is here",
"image": "http://image/coming/from/cms.jpg"
}
]
}
}
}
谢谢
【问题讨论】:
-
为什么不将它们存储在 MySQL 数据库中并使用 phpMyAdmin 进行编辑?为什么要安装完整的 CMS 来修改 JSON 数组?
-
@Pitchinnate 谢谢。这是保存可由内容管理员和营销人员编辑的内容的推荐方式。我不想在营销人员的机器上安装 phpMyAdmin 或 MysqlWorkBench 来编辑我们网站中显示的简单字符串。毕竟这是内容。 CMS 的“C”部分。而且不只是 json 数组,我在 CMS 中保存了真实的图像。
标签: php json architecture drupal-7 content-management-system