Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Very very Rookie
 
Peppermay
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-10-18
Lille, France
 

Hello to all. And sorry for this…

I’m trying to understand the Magento secrets and for this, I began with the “About Us” page, which seemed the easiest to me (maybe because it ‘s based on the 1-column layout… poor me)

I think I’ve understood that the page.xml goal was to gather all the contents blocks before inserting them in the structure template, at the good place.
I thought I’ve understood the <BLOCK> syntax, but there’s a big problem then

Looking at the “About us” html source, it seems obvious that the template/page/html/head.phtml is called to populate the <HEAD> web page, but looking at the page.xml, I see:

<block type="page/html_head" name="head" as="head">

I think I ‘d have been happy reading:

<block type="page/html_head" name="head" as="head" template="page/html/head.phtml>

For this would have meant that the page/html/head.phtml is actually inserted at this point.
Must I consider that this insertion is tacit at this point ? But then, why ?

Oh god… This question surely deserves an oscar or someting as the silliest question ever asked on this forum…

Because I would have

 
Magento Community Magento Community
Magento Community
Magento Community
 
Peppermay
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-10-18
Lille, France
 

Is my case such desperate ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
eklusman
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2008-10-09
 

<block type="page/html_head" name="head" as="head">
In that code, when you see “page/html_head” means that the block is loaded from “template/page/html/head.phtml”
You can see it is the same with the header for example

 
Magento Community Magento Community
Magento Community
Magento Community
 
Peppermay
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-10-18
Lille, France
 

All right !
Thank you so mush Eklusman for meaning I’m still worth of being answered !

After this key answer, theses ones will be almost funny:
- why some blocks have got a “template” attributes and some not ?
- what’s the meaning of the output attributes in the BLOCK tag ?
- why using “page/html_head” for meaning “page/html/head” ? With this “_” for a “/” ?

Yes, it’s getting worse and worse…
Well… I’m like a diesel engine: i’m a bit slow at starting, but then…

Thank you very much to all.

 
Magento Community Magento Community
Magento Community
Magento Community
 
eklusman
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2008-10-09
 

Unfurtunately I’m as rookie as you, but I’ll try to explain what I understand.

Blocks that nave a template attribute are the ones that define a structure layout, for example, when you define which template the page uses, like 1column, 3columns, etc.
The other blocks just reference to the phtml where the block html is.

For the output attribute I think it just means that the contents of that block are outputting directly to html, but I couldn’t find anywhere the attribute used with another result.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top