首页 > 代码库 > AW_blog 在任意页设置文章的数量

AW_blog 在任意页设置文章的数量

AW_blog是官方的一个blog插件,可支持最新版1.9.安装好后,在管理后台自动生成独立的BLOG管理菜单,有具体设置方法。如果要在CMS页设置显示的文章数量,具体操作方法是:

    1. Duplicate
      app\design\frontend\default\helloseasonal\template\aw_blog\blog.phtml
      to
      app\design\frontend\default\helloseasonal\template\aw_blog\bloghome.phtml
    2. Edit bloghome.phtml
    3. Optional: If you want to remove the pagination, remove the following occurrences
      1
      <?php echo $this->getChildHtml(‘aw_blog_comments_toolbar‘); ?>
    4. Optional: If you want to set a a limit to the no of post you want to show in the home page, add

       

      1
      if ($i++ > 5) break;

      below foreach

       
      1
      2
      3
      4
      5
      6
      ...
      <?php foreach ($posts as $post):
          if ($i++ > 5) break;
      ?>
          <div class="postWrapper">
              <div class="postTitle">
    5. Log in to Mangento Admin
    6. Go to CMS -> Pages and select the home page or the page you want to insert the blog
    7. Click Content on the side navigation
    8. At the placement which you want to insert, paste the following codes
      1
      {{block type="blog/blog" name="blog" alias="list_blog" template="aw_blog/bloghome.phtml"}}

转载于:http://www.entroducing.com/view/add-aheadworkss-blog-list-to-magento-home-page-or-any-cms-page

AW_blog 在任意页设置文章的数量