By mampwamp2 on
How to filter view by date?
the view just showing today post, yesterday post will not showing.
if there is no latest post, no post showing.
How to filter view by date?
the view just showing today post, yesterday post will not showing.
if there is no latest post, no post showing.
Comments
=-=
you can add the date to the sort.
how is the view set up ?
are you mean add date in
are you mean add date in argument?
which one should be use?
=-=
could you please provide a screenshot of how your view is set up and a more details as to what you are looking to have views do?
thank.. here the
thank.. here the screenshot
http://imgbin.org/index.php?page=image&id=9972
the block always show today article, if no article by today,
nothing will show...can this done by views.
How to set this?
=-=
do you have a view set up in the views.module for this?
if so, could you please take a screen shot if the views settings.
I think I understand what you
I think I understand what you want. You want a block to show only today's articles, if they exist.. If not, to show blank.
You can easily do this with Views by using Contextual Filters.
Create your View block that shows the content you want. At the pager you can set the number of articles to show if there are more articles posted on the same day (today).
Then add a contextual filter of the type
Content: Created dayand Provide a default value of the type:Current date.Apply, and test your view.
Hope this helps.
You can follow me on Twitter: @drupalexp or on my blog.
the Contextual filters module
the Contextual filters module is that this one?
https://drupal.org/project/context
=-=
contexual filters aren't a separate module. They are built into views ui on the far right hand side.
You'll see it under the
You'll see it under the Advanced tab in your View.
You can follow me on Twitter: @drupalexp or on my blog.
http://imgbin.org/index.php?p
http://imgbin.org/index.php?page=image&id=9989
where is the advanced tab? above is the screenshot of my views.
I see you are using Drupal 6.
I see you are using Drupal 6.
You should mention this when you ask for help.
Contextual Filters is the new name for Arguments. So you should add an Argument of the type Node:Created Day.
Then Provide default argument -> Current Date
Let me know!
You can follow me on Twitter: @drupalexp or on my blog.
thank very much..it working
thank very much..
it working now.
one more question,
if there is no post by today, can we print out "sorry, today no post."? on that page?
Yes you can, Under Basic
Yes you can,
Under Basic Settings, edit the Empty Text option. There you can add the text you want displayed if the View shows no results.
You can follow me on Twitter: @drupalexp or on my blog.
thank you very much
thank you very much
I need all articles from <24 hours.
How would i do this if i wanted to show all articles from the previous 24 hours?