首页 > 代码库 > AW_blog 在任意页设置文章的数量
AW_blog 在任意页设置文章的数量
AW_blog是官方的一个blog插件,可支持最新版1.9.安装好后,在管理后台自动生成独立的BLOG管理菜单,有具体设置方法。如果要在CMS页设置显示的文章数量,具体操作方法是:
- Duplicate
app\design\frontend\default\helloseasonal\template\aw_blog\blog.phtml
to
app\design\frontend\default\helloseasonal\template\aw_blog\bloghome.phtml - Edit bloghome.phtml
- Optional: If you want to remove the pagination, remove the following occurrences1
<?php
echo
$this
->getChildHtml(
‘aw_blog_comments_toolbar‘
); ?>
- Optional: If you want to set a a limit to the no of post you want to show in the home page, add1
if
(
$i
++ > 5)
break
;
below foreach…
123456...
<?php
foreach
(
$posts
as
$post
):
if
(
$i
++ > 5)
break
;
?>
<div
class
=
"postWrapper"
>
<div
class
=
"postTitle"
>
- Log in to Mangento Admin
- Go to CMS -> Pages and select the home page or the page you want to insert the blog
- Click Content on the side navigation
- At the placement which you want to insert, paste the following codes1
{{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 在任意页设置文章的数量
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。