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

Static block to header image
 
Kimura
Member
 
Avatar
Total Posts:  48
Joined:  2008-04-21
Hungary
 

I want to change the header image ang logo for a static block.
I did this:

I’ve created a static block, what’s name headhead, and I put an image to it.
Now I changed the page.xml:

<block type="page/html_header" name="header" as="header">
                <
block type="page/template_links" name="top.links" as="topLinks"/>
                <
block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <
block type="core/text_list" name="top.menu" as="topMenu"/>
                
              
[i]  [b]<block type="cms/block" name="my_block">
                <
action method="setBlockId"><block_id>headhead</block_id></action>
            </
block>[/b][/i]
            
</block>
Put the selected code

After that, I put this code to the header.phtml :

<?php
?>

<div class="header-top-container">
    <
div class="header-top">
        <
h1 id="logo"><a href="<?php echo $this->getUrl('') ?>">[b][i]<?php echo $this->getChildHtml('headhead'?>[/i] [/b]</a></h1>
        <
class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content'?> &raquo;</strong></a></p>

        
<?php echo $this->getChildHtml('topSearch'?>

        
<div class="quick-access">
            <
strong><?php echo $this->htmlEscape($this->getWelcome()) ?></strong><br/>
            <
div class="shop-access">
                
<?php echo $this->getChildHtml('topLinks'?>
            
</div>
            
<?php echo $this->getChildHtml('store_language'?>
        
</div>

    </
div>
</
div>
<?php echo $this->getChildHtml('topMenu'?>
[i]
<div id="headhead"
[b]<?php echo $this->getChildHtml('headhead'?>  [/b]</div>[/i]

I put it twice times, if there is an another problem, but no. My headhead static block not shown. Has anybody got ideas what’s the problem?

Thanks

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