Oh snap! You are using an old version of browser. Update your browser to get new awesome features. Click for more details.

Magento – AheadWorks Blog – Display blog posts to CMS pages


 AW Blog is a Magento extension from aheadWorks that is reckoned among the best buzz and word of mouth marketing tips. It not only provides your regular customers with up-to-date information but brings additional visitors to your site, builds relevant SEO-friendly text links, and serves as assistance in building sales strategy.

The Blog extension gives you a noteworthy opportunity to communicate with your regular customers and casual visitors. With Blog you can create an interactive two-way communication platform to provide official information on your store news, upcoming products, promotions, and get customers’ feedback.

Plugin is available from

http://www.magentocommerce.com/magento-connect/aheadworks/extension/1516/blog-extension-by-aheadworks

Display blog posts to CMS pages :

Step 1

In /public_html/app/design/frontend/default/default/template/aw_blog/
Add new Phtml file Ex. blog-homepage.phtml
and Copy and Past this code in blog-homepage.phtml

Code :

<?php
$posts = Mage::getModel('blog/blog')
                    ->getCollection()
                    ->addPresentFilter()
                    ->addStoreFilter(Mage::app()->getStore()->getId())
                    ->addFieldToFilter('status', 1)
                    ->setOrder('created_time ', 'desc')
                    ->setPageSize(3);
if(count($posts)):                   
?>
    <h3><?php echo $this->__('BLOG - Latest Posts');?></h3>
    <ul>
    <?php foreach ($posts as $post): ?>
        <li>
            <a href="<?php echo $post->getAddress(); ?>"><?php echo $post->getTitle(); ?></a>
            (<?php echo $this->formatDate($post->getCreatedTime(), Mage::getStoreConfig('blog/blog/dateformat'), true); ?>)
        </li>
    <?php endforeach; ?>
    </ul>    
    <div id="messages_product_view"></div>
<?php endif;?>

You can change blog post limit Change in ->setPageSize(3) set your size

Step 2

Now call blog-homepage.phtml in cms page
Open your cms page -> Edit page -> Click Content tab
And add this

{{block type="core/template" name="homepage.blog" template="aw_blog/blog-homepage.phtml"}}

And Also call in another phtml file
Ex. Open any Phtml file and write this line

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('aw_blog/blog-homepage.phtml')->toHtml(); ?>

Enjoy :)

16 comments

  1. The GetAddress does not work if we use this code (adding via {{BLOCK}}

    ReplyDelete
  2. adjust widget_post.phtml to the above mentioned code
    just don't enter the first 10 lines and keep the first line to the widget_post.html (getRecent()): ?>)

    You can call it in any page by adding this:
    {{widget type="blog/last" blocks_count="3" }}

    If you would like to filter the categories:
    {{widget type="blog/last" blocks_count="3" categories="9,8,4,2 }}

    ReplyDelete
  3. Thanks for sharing this great article! That is very interesting I love reading and I am always searching for informative information like this.
    professional web design utah

    ReplyDelete
  4. Hi! I have 1.5 years experience. I search in Google so Many Websites & Blog but you’re blog and post really is too good its title, description, images your content style is really good and I feel glad when post read Social Media Marketing Agency India

    ReplyDelete
  5. Great Read! I am impressed on how you make your article easy to understand. I'll come back for more :D

    offshore magento development

    ReplyDelete
  6. Nice Blog, thank you for sharing the useful information. Visit our magento development company india

    ReplyDelete
  7. Thanks for sharing this really great article! That is very important.

    Custom eCommerce solution providers

    ReplyDelete
  8. Very interesting article. Thanks for sharing valuable information

    Magento ecommerce Services

    ReplyDelete
  9. this is really nice to read..informative post is very good to read..thanks a lot!
    newizze

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. If you are looking for magento web development company india then you can contact us at:847-002-6258

    ReplyDelete
  12. Very informative blog. Thank you for sharing.
    Contact Agentosupport, a Magento 2 development company in Dallas, USA and get 24/7 magento support service.

    ReplyDelete
  13. Thanks for sharing this useful content. Hot Data is Top Blogging Agency, that accepts Guest Post. If you have the Content on Education, Technology & Health Topics you can Submit Free Guest Post here.

    calcium rich foods
    Hot Data

    ReplyDelete
  14. Since this platform is open-source and available free of charge, there has been a spike in Magento website development services in Mumbai. The web developers and coders have listed various reasons for this upsurge.

    ReplyDelete