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

Where Are These Found? getUrl(’’)
 
Primary Numbers
Jr. Member
 
Total Posts:  17
Joined:  2007-09-03
 

When we have code like this:

<a href="<?=$this->getUrl('')?>"><img src="<?=$this->getLogoSrc()?>" alt="<?=$this->getLogoAlt()?>"/>

Where are the functions for getURL, getLogoSRC found… (so if i need to change these values where do I change them).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Most probably you won’t need to customize $this->getUrl(’’) method as it’s general method of creating router specific URLs.
Basic format is <?=$this->getUrl('module/controller/action', array('param'=>$value))?>

getLogoSrc, getLogoAlt are methods of the block class that is rendering this template.
You can find the class name from the layout tag that is refering to this template.

Your example is coming form template/page/html/header.phtml which is refered from layout/core/default.xml.

The block definition there is < block type="page/html_header" name="header" as="header" >
Which means that the class called is Mage_Page_Block_Html_Header.
There you can find the methods smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Primary Numbers
Jr. Member
 
Total Posts:  17
Joined:  2007-09-03
 

I’m confused by this:

<div class="informational">
<?=$this->getChildHtml()?>
</div>

Where is the data for getChildHtml() being stored…

 
Magento Community Magento Community
Magento Community
Magento Community
 
_
Sr. Member
 
Total Posts:  152
Joined:  2007-08-31
 

That depends on phtml and xml file you’re using. getChild references to the layout xml file so you can simply see there which file is used as a child.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ddcddc
Jr. Member
 
Total Posts:  2
Joined:  2009-02-20
 

Hi. I know this sounds so trivial but I seriously cannot figure out what is going on.  I’ve just installed this script on our servers.  I uploaded our header (and will fix the design as soon as I figure out how) but there is one small nagging error I’m getting.  The getlogoalt seems to be buggy.  No matter what I do it always throws some kind of text under the logo block I inserted.  I’ve tried putting th actual html code in the field in the admin area (which is what I had to do in order to get the header to insert and link to our home page), using just text, etc.

http://www.1eg.net/shoppingmall/index.php/

Sorry to bother everyone with this but I am frustrated.

Hopefully I’ll be able to edit the correct page to match the logo without much pain.  Are there stock themes installed?  where are they located.

Thanks.

Darlene

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