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

Using page title in template
 
BneXt
Jr. Member
 
Total Posts:  14
Joined:  2008-03-18
 

Hello,

I’m currently creating a custom template for Magento (1.1.1).

Now I want to be able to display the page title in the 1column.phtml, but I don’t know how to do it?

<?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?>

The above code doesn’t work in this part of the template.

Any help would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BneXt
Jr. Member
 
Total Posts:  14
Joined:  2008-03-18
 

I still didn’t find out how to do this?

Any help would be great smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
BneXt
Jr. Member
 
Total Posts:  14
Joined:  2008-03-18
 

One more kick.

I really need this, does anyone know if this is possible?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rashadex
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-01-20
 

Hello BneXt, I am using Magento, too. I agree with you. Some documentation materials are too old. Sometimes you follow guidelines written in these docs, but you see such a file does not exist at all. That is why whole the time you need yourself investigate the code.

as to what you wrote here, the only thing that I can say you : Bear in mind Magento has been created using MVC. In other words develpers of Magento wanted to create first an API like Struts MVC. MVC is short for “Model View Controller”. This first came Java developmenr with frameworks like Spring or Stuts, etc.

Developers of Magento also wanted to create their own MVC first, so they made the code too non-understantable. it is hard to investigate the code. I even created a special code analyzer application which for me crawles the code and finds definitions.

About your design, if the is “$this->” it means it wants to access the View. Controller operates the entire code, Model is a representation of the logic For example currency and so on. View is the display. Views are using interfaces and themes.

To understand why that code does not work you must find which view does it belong to. Then you must find its controller and model. There you can see what variables are passed to templates.

I have not yet started with Magento’s design. I am yet allowing third party currencies which are not supported in Magento by default, developing third party payment modules. In the coming future I will work on themes. May be I will face with such problems as you say.

If something I find, I will write to you

 
Magento Community Magento Community
Magento Community
Magento Community
 
BneXt
Jr. Member
 
Total Posts:  14
Joined:  2008-03-18
 

Thanks for your explanation rashadex!

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