I want to change the template with block name "persistent.remember.me", but there are two blocks with that same name under the same handle:
app/design/frontend/base/default/layout/persistent.xml
<checkout_onepage_index>
<reference name="checkout.onepage.login">
<action method="setTemplate"><template>persistent/checkout/onepage/login.phtml</template></action>
<block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
</reference>
<reference name="checkout.onepage.billing">
<action method="setTemplate"><template>persistent/checkout/onepage/billing.phtml</template></action>
<block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
<block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
</reference>
</checkout_onepage_index>
I have created a local.xml with the following contents:
app/design/frontend/mytheme/default/layout/local.xml
<checkout_onepage_index>
<reference name="persistent.remember.me">
<action method="setTemplate"><template>mytheme/persistent/remember_me.phtml</template></action>
</reference>
</checkout_onepage_index>
And everything works fine; Only the template of the last reference ("checkout.onepage.billing") gets updated, which is exactly what I want, but I'm not sure why it does this. I was under the impression that block names should always be unique. Is this a bug in Magento? What could happen to this code if I upgrade Magento?