|
I’ve read through the designers guide but I still can’t look at the xml files and see where all the tag attributes are referring to..
Example code from catalog.xml:
<catalog_product_view> <!-- Mage_Catalog --> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</template></action> </reference> <reference name="head"> <action method="addJs"><script>varien/product.js</script></action> </reference> <reference name="content"> <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml"> <block type="catalog/product_view_super_config" name="product.info.config" as="super_config" template="catalog/product/view/super/config.phtml"/> <block type="catalog/product_view_super_group" name="product.info.group" as="super_group" template="catalog/product/view/super/group.phtml"/> <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml"/> <block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" /> </block> </reference> <reference name="right"> <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/> </reference>
</catalog_product_view>
-I’m pretty sure that catalog_product_view refers to the type of page that is being viewed, and the child elements are used when it’s demanded that the catalog.xml layout is updated to the product_view layout (rather than default layout).
-the template attribute loads the contents of the block by loading the phtml file
-block type, how does this work?
-block name, whats the use of this again?
And then in other files I see a method used called thisChildHtml or something, how does that compare to whats happening to the above code?
That’s all my questions for now
|