Magento CMS 添加上传功能
我想向我的 CMS 页面添加一个自定义字段,允许使用管理面板的用户上传并指定他们选择的图像以在页面上显示为横幅。我会设置该图像在模板中的显示位置。有没有人遇到过此功能或对从哪里开始有任何建议?
我正在运行 1.3.x,并且我读到 1.4 有更好的tinyMCE 功能,所以我想升级后会更容易,是真的吗?有人有过像 Magento 这样的丰富 CMS 的经验吗?我希望找到一个类似于 WordPress 中自定义字段和写入面板工作方式的解决方案。
I’d like to add a custom field to my CMS pages which allows someone using the admin panel to upload and specify an image of their choice to appear as a banner on the page. I would set where this image appears in the template. Has anyone come across this functionality or have any recommendations on where to begin?
I am running 1.3.x and I have read that 1.4 has nicer tinyMCE features, so I imagine this will be easier with an upgrade, is that true? Anyone have any experience with richer CMS like this for Magento? I am hoping to find a solution similar to the way Custom Fields and Write Panels work in Wordpress.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议的第一个解决方案是创建自定义小部件。
小部件是一种特殊的块,可以添加到您的 CMS 内容中 - 页面和静态块。
要创建新的小部件,首先您应该在模块中创建新块
之后,您应该在模块的 etc 目录中创建 widget.xml 文件
执行此步骤并刷新缓存后,新的小部件应该在您的 cms 内容的小部件选择器中可见 - 那里是所见即所得的“插入小部件”按钮。
The first solution which I could suggest is to create custom widget.
Widgets are special kind of blocks which could be added to your CMS content - both pages and static blocks.
To create new widget first of all you should create new block in your module
After that you should create widget.xml file in your module's etc directory
After doing this steps and flushing cache new widget should be visible in widget selector of your cms content - there is a button "insert widget" in WYSIWYG.