「複数のブログの記事を混ぜて取得してテーマ上でカスタマイズしたい」を編集中
提供: baserCMS公式ガイド
警告: ログインしていません。
編集すると、IPアドレスがこのページの編集履歴に記録されます。この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
行10: | 行10: | ||
$BlogPost = ClassRegistry::init('Blog.BlogPost'); | $BlogPost = ClassRegistry::init('Blog.BlogPost'); | ||
$posts = $BlogPost->find('all', array( | $posts = $BlogPost->find('all', array( | ||
− | 'conditions' => array_merge($BlogPost->getConditionAllowPublish()), | + | 'conditions' => array_merge($BlogPost->getConditionAllowPublish()) ), |
'order' => array('BlogPost.posts_date DESC'), //公開日順にソート | 'order' => array('BlogPost.posts_date DESC'), //公開日順にソート | ||
'limit' => 1000, //取得記事数 | 'limit' => 1000, //取得記事数 |