gpt4 book ai didi

magento - 将迷你登录添加到页面标题

转载 作者:行者123 更新时间:2023-12-02 10:13:20 26 4
gpt4 key购买 nike

我想将用户登录选项添加到我的网站标题 this

我已添加

<block type="customer/form_login" name="mini_login" template="customer/form/mini.login.phtml" />

app/design/frontend/base/default/layout/page.xml文件和

<?php echo $this->getChildHtml('mini_login') ?>

app/design/frontend/base/default/template/page/html/header.phtml文件,但什么也没有出现。我确实添加了Hello之后<?php echo $this->getChildHtml('mini_login') ?>Hello确实出现了。我确实清除了缓存存储,但它仍然没有出现。

为什么不显示登录信息?

最佳答案

转到customer.xml (路径应用程序/设计/前端/您的包/您的模板/布局)在 <default></default> 下添加以下标签默认标签

<default>
....
<reference name="header">
<block type="customer/form_login" name="header_customer_form_mini_login" template="customer/form/mini.login.phtml"/>
</reference>
...
</default>

header.phtml下调用此文件使用此代码 <?php echo $this->getChildHtml('header_customer_form_mini_login');?>

关于magento - 将迷你登录添加到页面标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23221427/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com