开发者

date range in drupal-6 view arguments?

I have a view which loads certain goods elements on the view based upon start date and end开发者_StackOverflow date, what i need is a date range. Unfortunately in drupal arguments there is no range and filtering option.

I'm using only one table in mysql, which receive from and two date and returns specific items.

I tried this code, but it's not working. Is there any date-range filter which does the job or should I write my own filter?

function abc_display_screen() {
  $viewName = 'abc';
  $arg = '2008-01-04--2014-02-04';
  $viewsHtml .= views_embed_view($viewName, 'default', $arg);
  return $viewsHtml;
}


Could you not use two filters instead?

Filter by dates below x and above y ?


I think the date module may do this for you. It has some views integration and I belive that this is something it does. However the versions you are using may cause some integration headaches at the moment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜