Magento 静态 CMS 块存储在哪里?
我无法确定静态 CMS 块在数据库中的位置。他们在哪里?
我需要知道这一点的原因是,当我将数据库和主题文件从本地安装移动到在线开发安装时,该块不会更新,我需要为每次安装重新创建它们。
后续问题是,如何以编程方式创建它们?
编辑:如果有人发现问题不清楚,我知道如何在 Magento 后端创建静态块。问题是它们存储在 Magento 数据库/文件系统中的哪里?
I cannot the location of static CMS blocks in the database. Where are they?
The reason I need to know this is that when I move the database and my theme files from my local install to my online dev-install, the block does not update, and I need to re-create them for each installation.
Follow-up question would be, how do I create them programmatically?
EDIT: If anyone finds the question unclear I know how to make a static block in the Magento backend. The question is where are they stored in the Magento db/filesystem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
块存储在数据库表
cms_block
中。但如果您要以编程方式创建它们,则不需要知道这一点。Blocks are stored in the database table
cms_block
. But you don't need to know that if you are going to create them programmatically.它们位于数据库表
cms_block
中,就像发条极客所说的那样,但请注意,如果您通过 sql 将它们添加到数据库中(例如使用模块安装脚本),您还需要添加新创建的将块 ID 和商店 ID 添加到表cms_block_store
中,否则该块将不会出现。They are in the db table
cms_block
like clockwork geek has said, but be aware that if you add them into the db through sql (using a module install script for example) you also need to add the newly created blocks id and the store id to tablecms_block_store
or the block won't appear.