ターペンタイン構成のマゼントノワンズ
-
13-12-2019 - |
質問
ここで誰かがこれを少し助言できることを願っています。
私たちが持っているものは、Layoutによって管理されている私たちのトップリンクセクションにログイン/ログアウトして登録/マイアカウントです。ターペンタインを穴にパンチするためにこれを使ってください。
ワニスやブラックリストを無効にする/ *コンフィギュレーションで機能しますので、レイアウトが正しいものではないことがわかります。
下記のように働くようにするためにこれを試してみるためのいくつかのステップを試みました。
- フラッシュイベントの範囲(すべてがトリガーするはずだと思うすべて)
- 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 /私たちのテーマの間にいくつかの互換性の問題があるようです。だから私たちがしなければならなかったものも同様の問題に遭遇している他の誰かの利益のために:
register.xmlでは、デフォルト設定でレジスタリンクを追加します。
その後、customer_logged_inとcustomer_logged_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>
. 所属していません magento.stackexchange