By masseyn on
I have set up a fixture list on my site but i have a block that i want to display the next two upcoming fixtures only. What do i set on the view to display the next two fixtures by date from the current date....
I have set up a fixture list on my site but i have a block that i want to display the next two upcoming fixtures only. What do i set on the view to display the next two fixtures by date from the current date....
Comments
If you are using the Date API
If you are using the Date API module you can add a filter on your date field, pick "greater than equal to" and use "now" for the default. Then limit the view to only list 2 items.
Thanks
nevets, thanks for your help. Sorted the issue straight away. Think i was having "blonde" moment at 5am in the morning !!!! Thanks
Still not working
I am using drupal 6 and still cannot get this view to show the next two fixtures from the current now date. can someone please do a step by step or post the settings i need to change.
Help
Any ideas
current setup
What does your current view look like? Are you sure there is data? I know that sounds silly, but maybe you don't have 2 events in the future scheduled yet?
If you remove the date conditional do any events show?
any ideas...
i have scheduled our whole fixture list and if i add a sort filter on the dat and then change between asc and desc the fixtures sort correctly. so i know the dat field is recognised and working but i cannot work out under which area and how i set it to display only the next two evenbts\fixtures from the now date....
next (or previous) node based on date field (not current date)
A little different a scenario...
I can't seem to set up a views block (using either arguments or a dynamic filter) to display the next (or previous) node (filtered by type) based on a date field.
Anyone able to offer an approach/solution
thx
avolve designs | ethical by design
PHP code
I'm having exactly the same issue. Obviously we can't enter an absolute date nor a relative date like "now" in the date filter; we would need a way to enter some PHP code into the filter to make it consider the date from the date field in the current node (which doesn't seem to be possible). Or am I missing something?
Any ideas or suggestions?
Edit: An approach might be to use the 'Custom Pagers' module with an argument (in the View) and a token (in the custom pager). This is not very pretty, but seems to work more or less (gives a pager through events, if the View filters for events, and it works raltive to the node that is currently viewed).