1

I was wondering if there is a way to hook into the front page layout, other than

<cms_index_index>...</cms_index_index>  

Given I don't know everyhing about Magento, and the too-general looking route above, It's not too far fetched to assume that this layout is loaded at other instances other than store-front-page. I wouldn't want that.

Specifically, what I'm trying to do is to append blocks to the content block, only if It's the store front page.

4

1 に答える 1

0

<cms_index_index>そのページが何であれ、それがホームページに使用されるレイアウト ハンドルであることは確かです。
これは、 を使用してそのページのレイアウト ハンドルで指定しない限り、他のページには読み込まれません<update handle="cms_index_index" />。これはあなたの場合ではないと思います。

もう 1 つのオプションは、ホームページとして選択したページの管理画面に xml レイアウトを直接追加することです。これの欠点は、ホームページを別の cms ページに変更する場合、xml を再度追加する必要があることです。

于 2013-12-17T20:55:03.483 に答える