关于70的那段代码,求助。

模板开发以及发布测试

版主: seita

回复
yhn000
帖子: 9
注册时间: 2009年 10月 22日 18:10

关于70的那段代码,求助。

帖子 yhn000 »

<?php $this->widget('Widget_Archive@myCustomCategory',

'type=category', 'mid=1')->to($categoryPosts); ?>


然后操作$categoryPosts这个变量即可

我把模板都弄好了才发现的。
发现70给的那段显示某一分类最新文章的代码,不能多次用。
指定一个分类了,再指定一个分类输出的还是第一个分类下内容。
yhn000
帖子: 9
注册时间: 2009年 10月 22日 18:10

Re: 关于70的那段代码,求助。

帖子 yhn000 »

<?php $this->widget('Widget_Archive@myCustomCategory',

'type=category', 'mid=1')->to($categoryPosts); ?>


然后操作$categoryPosts这个变量即可

就是这个我把mid修改为2了,输出后还是mid为1的内容。
头像
aijun
帖子: 117
注册时间: 2009年 7月 10日 03:04
联系:

Re: 关于70的那段代码,求助。

帖子 aijun »

不明白,截个图,或者给个严实地址看看的。
yhn000
帖子: 9
注册时间: 2009年 10月 22日 18:10

Re: 关于70的那段代码,求助。

帖子 yhn000 »

图片
就是这样,其实是两个分类,一个分类mid是1,一个分类mid是2,但输出的都为同一个内容。
yhn000
帖子: 9
注册时间: 2009年 10月 22日 18:10

Re: 关于70的那段代码,求助。

帖子 yhn000 »

求解....
这么久了没解决。 :Q
头像
aijun
帖子: 117
注册时间: 2009年 7月 10日 03:04
联系:

Re: 关于70的那段代码,求助。

帖子 aijun »

第一行,@后面换个名字
yhn000
帖子: 9
注册时间: 2009年 10月 22日 18:10

Re: 关于70的那段代码,求助。

帖子 yhn000 »

多谢君哥的帮助,解决啦!:)
回复