Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在我的新模块(派生自 mod_latest_news)中向文章的 ContentModel 添加条件,以便它仅获取今天创建的文章。我尝试将以下内容添加到helper.php模块的文件中:
helper.php
// Date must where created today $model->setState('a.created', date('Y-m-d'));
但这似乎没有帮助。难道我做错了什么?
尝试
$model->setState('filter.date_filtering', 'relative'); $model->setState('filter.relative_date', 1);