如何使用自定义模块覆盖默认的 magento cms 主页条目?

发布于 2024-10-06 14:30:58 字数 382 浏览 0 评论 0原文

当您安装magento时,我目前正在尝试使用自定义模块作为第一页,我目前在主页中有 {{block type="namespace_module/block" template"path/to/template.phtml"}} cms 条目,但不幸的是它没有调用我请求的模板或模块,我现在正在尝试找出是否可以使用自定义模块(由indexController.php 控制)来优先于 cms 主页页面条目。

这背后有两个原因,一是它会给我更大的灵活性来扩展索引页面,二是它会让我比我想包含在该特定页面上的 css/js 具有更大的灵活性。

如果有人知道让自定义模块优先于 cms 主页的解决方案,这对我自己和整个社区来说将是一个巨大的帮助,因为许多人不知道这是如何实现的。

感谢您提供的任何帮助。 瑞安

I am currently attempting to use a custom module as the first page when you hit the magento installation, i currently have {{block type="namespace_module/block" template"path/to/template.phtml"}} located within the home page cms entry, but unfortunately it is not calling the template or the module which i am requesting, i am now looking at trying to find out if its possible to use a custom module (controlled by indexController.php) to take precidence over the cms home page entry.

This has two reasons behind it, reason 1, it will give me more flexibility for me to extend the index page, and 2, it will allow me more flexibility over css/js which i want to include on that specific page.

If anyone knows of a solution to getting a custom module to take precidence over the cms home page it would be a huge help to myself and the community at large as many people are un-aware of how this is achieved.

Thanks for any assistance provided.
Ryan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

落墨 2024-10-13 14:30:58

如果您有自定义控制器,则将其 系统中的“noreferrer”>frontname/controller/action路径>配置>网页>默认页面>默认网址。

If you have a custom controller then put it's frontname/controller/action path in System > Configuration > Web > Default Pages > Default Web URL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文