我们在这里有一点很长的镜头,我希望有人可以在这一点建议。

我们在通过布局管理的顶部链接部分中是一个登录/注销和注册/我的帐户。我们正在尝试使用松节油来打孔,这样它就显示了根据状态的Logggged来显示正确的链接,但我们似乎无法触发它。

在配置中禁用清漆或黑名单/ *它有效,所以我们知道没有清晰的布局是正确的。

我们尝试了一些步骤来尝试,并在下面看到这一点。

  • 互美事件的范围(我认为应该触发的所有情况)
  • TTL设置为0
  • turpentine_cache_flag到0
  • 通过引用和块级施用

任何人都可以确认我们是目标的事件顺序应该导致缓存在它会产生正确输出的点处刷新。如果我们正在击中太早或迟到,我想象可能会刷新信息,但基于执行点,链接是正确的?

除此之外,建议可以采取哪些措施,以便使用正确的输出来实现以正确的输出。

自定义布局XML:

<default>
        <reference name="top.links">
            <action method="setEsiOptions">
                <params>
                    <access>private</access>
                    <cacheType>per-client</cacheType>
                    <flush_events>
                        <customer_login />
                        <customer_logout />
                    </flush_events>
                </params>
            </action>
            <action method="removeLinkByUrl"><url helper="customer/getAccountUrl" /></action>
        </reference>

    </default>

    <!-- CUSTOMER XML-->
    <customer_logged_in>
        <turpentine_cache_flag value="0"/>
        <reference name="top.links">
            <action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>
            <action method="removeLinkByUrl"><url helper="enterprise_invitation/data/getCustomerInvitationFormUrl" /></action>
            <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
            <action method="addLink" translate="label title before_text" module="customer"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title><prepare/><urlParams/><position>50</position><li/><a>class="my-account"</a></action>
        </reference>
    </customer_logged_in>
    <customer_logged_out>
        <reference name="top.links">
            <action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
            <action method="addLink" translate="label title" module="customer"><label>Login</label><url helper="customer/getLoginUrl"/><title>Login</title><prepare/><urlParams/><position>50</position><li></li><a>class="login"</a></action>
        </reference>

    </customer_logged_out>
    <!-- END CUSTOMER XML-->
.

page.xml(top.links) 我们尚不清楚支持参考,因此请直接在Page.xml文件中的块上尝试如下:

<block type="page/template_links" name="top.links" as="topLinks">
                    <action method="setEsiOptions">
                        <params>
                            <access>private</access>
                            <flush_events>
                                <page_block_html_topmenu_gethtml_before />
                                <page_block_html_topmenu_gethtml_after/>
                                <customer_session_init />
                                <customer_login />
                                <customer_logout />
                                <visitor_init />
                            </flush_events>
                        </params>
                    </action>
                </block>
.

有帮助吗?

解决方案

所以我们在进一步调试后发现了,似乎是它与RWD /我们的主题之间的一些兼容性问题。因此,为了遇到遇到类似问题的任何人,我们所要做的是:

在Customer.xml中删除默认情况下,RWD主题默认配置添加寄存器链接。

然后在customer_logging_in和customer_logging_out我们正在通过布局更新添加寄存器或我的帐户链接。

示例:

<customer_logged_out>
    <reference name="top.links">
        <action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
        <action method="addLink" translate="label title" module="customer"><label>Login</label><url helper="customer/getLoginUrl"/><title>Login</title><prepare/><urlParams/><position>50</position><li></li><a>class="login"</a></action>
        <action method="addLink" translate="label title" module="customer"><label>Register</label><url>/customer/account/create</url><title>Register</title><prepare/><urlParams/><position>40</position></action>
    </reference>

</customer_logged_out>
.

许可以下: CC-BY-SA归因
scroll top