Transferring Sidebar Module to Homepage in Magento

Discussion in 'Programming' started by Borduhh, Dec 8, 2010.

  1. #1
    Hello All,

    So I have a Daily Deal module that is installed on the sidebar of my website (http://www.outplaypoker.com/accessories.html). However I would like to make it appear on the homepage of my website, but I have no sidebar?

    The file that calls the code for the sidebar widget is located on my server at /app/design/frontend/default/default/template/dailydeal.

    I was thinking that I had to use a format like
    {{block type="core/template" name="a-name" template="cms/home.phtml"}} 
    Code (markup):
    However I saw that I can call a block directly using:
    <?php echo $this->getLayout()->createBlock('mymodule/myblock')->setTemplate('mymodule/myblock.phtml')->toHtml(); ?>
    PHP:
    But I am editing the homepage in CMS > Pages in the admin panel so I do not think I can include PHP code.

    Any help would be much appreciated!

    Best Regards,
    Nick
     
    Borduhh, Dec 8, 2010 IP
  2. Borduhh

    Borduhh Well-Known Member

    Messages:
    767
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    150
    #2
    Ok, I tried using this:

    {{block type=”dailydeal/dailydeal” template=”dailydeal/sidebar_left.phtml”}}
    Code (markup):
    Nothing :(

    Best Regards,
    Nick
     
    Borduhh, Dec 8, 2010 IP
  3. Borduhh

    Borduhh Well-Known Member

    Messages:
    767
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    150
    #3
    Ok I have it appearing now, but it is not calling anything. My guess is because the code is in a different spot.

    The code is:
    <?php if (Mage::getStoreConfig('dailydeal/sidebar_configuration/display_name')): ?>
    			<a href="<?php echo $this->getUrl('dailydeal'); ?>"><span class="product_name"><?php echo $_product->getName(); ?></span></a><br/>
    		<div class="container">					
    			<? if (!Mage::getStoreConfig('dailydeal/sidebar_configuration/display_price') && !Mage::getStoreConfig('dailydeal/sidebar_configuration/display_qty')): ?>
    				<a href="<? echo $this->getUrl('dailydeal'); ?>"><img class="product_image_big" src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(150,150);?>" alt="dailydeal_image" />
    			<? else: ?>
    				<a href="<? echo $this->getUrl('dailydeal'); ?>"><img class="product_image" src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(70,70);?>" alt="dailydeal_image" />
    PHP:
    But for some reason I cannot find that location in my ftp.

    Any ideas?

    Best Regards,
    Nick
     
    Borduhh, Dec 8, 2010 IP