覆盖自定义模板中的 Magento app/design/frontend/base/default/template

发布于 2024-12-15 00:29:12 字数 277 浏览 4 评论 0原文

我试图覆盖

 /app/design/frontend/base/default/template/paypal/partner/logo.phtml

名为 MyTemplate 的自定义模板,我是否

paypal/partner/logo.phtml

下复制?

app/design/frontend/default/MyTemplate/template/

Im trying to over ride

 /app/design/frontend/base/default/template/paypal/partner/logo.phtml

in my custom template called MyTemplate do I copy

paypal/partner/logo.phtml

under

app/design/frontend/default/MyTemplate/template/ ?

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

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

发布评论

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

评论(1

笨笨の傻瓜 2024-12-22 00:29:12

有多种方法可以实现这一目标,Magento 背后的团队对“正确”的做事方式持中立态度,“替换”模板的最简单方法是将基本模板复制到主题模板文件夹中的同一位置。

app/design/frontend/base/default/template/paypal/partner/logo.phtml
app/design/frontend/default/mytemplate/template/paypal/partner/logo.phtml

There's multiple ways to pull this off, and the team behind Magento is neutral on "the right" way to do things, but the simplest way to "replace" a template is to copy the base template to the same location in your theme's template folder.

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