Views with content and scheduler in Drupal
I have enabl开发者_如何学Pythoned the Scheduler in my Drupal website and then I created a content type named as VAT. I have enabled the scheduler option in this content so when I add content of type "VAT", there are two text fields; publish date and unpublish date. Now I want to create a view in which I want to display content from "VAT" and these content should be displayed according to their publish and unpublish date. How can I do this?
Create a view as you normally would. When it comes to filter out only posts that are scheduled, add the filter called "Scheduled: publish on" and in its settings, change the Operator to "Is not empty (NOT NULL)". That will only show posts that have a scheduled publish time. If under "Basic settings" you choose "Fields" as the row type, you can show the scheduled publish/unpublish dates.
It may be good to create a separate view for scheduled unpublished dates, if you use that field.
Add other filters as appropriate, such as content type, but don't include a filter for Published = Yes. Otherwise unpublished but scheduled to publish posts won't show up. Also be sure to add some access control under "Basic settings", so that instead of "Unrestricted", only privileged users can see the list of posts to be scheduled for publication/unpublication.
精彩评论