Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So I have a timeline of historic events broken down by decades. In the past, I was able to use the Insert View code [view:Timeline=30=1809--1819] which would display 30 timeline events per page between the years 1809 and 1819. This code no longer works as ALL timeline events are displayed, even ones outside the date range (1809-1819).
I'm hoping this is a simple syntax issue. I did try searching but wasn't able to find a solution. Sorry if it's painfully obvious.
Thanks!
-Chris
Comments
Comment #1
PasqualleWhat argument (contextual filter) do you use for preview on view edit page to preview the result? The same argument works with insert_view.
Comment #2
CLKeenan CreditAttribution: CLKeenan commentedI currently don't have anything set in there. Unfortunately, I had a developer make this view for me. It appears as though he just used args within the insert view line (but not in the actual view itself) to set the appropriate ranges for each timeline set.
Any other ideas?
Comment #3
PasqualleIt is not a settings, it is always empty. You can test the argument there.
If you can't figure out what is the correct argument, then post a screenshot of your arguments settings from the view edit page.
Comment #4
CLKeenan CreditAttribution: CLKeenan commentedRight, I can't figure out the correct argument. I've posted a screenshot of my argument screen here: http://www.course-notes.org/images/drupalview.png
You can see I'm trying to group timeline events between year ranges. In this case it's 1800:1810. I followed the example in the help text for the YYYY:YYYY syntax.
Any help would be greatly appreciated!
-Chris
Comment #5
PasqualleI think the correct date range argument is 1809--1819 if you are using the views_daterange module.
The thing which must be wrong is the "30". The second param is the view display name, which can not be 30.
how many arguments do you have in the view?
if 2 and the second argument is the date range then the correct syntax probably is
[view:Timeline==30/1809--1819]
ps: the view name should be lowercase, but if you see some results from the view, then it is probably ok as is..
Comment #6
PasqualleI understand now. The 30 was used to limit the result to 30. But it worked only in Drupal 5 version. If you need to limit the result, make the limit in the view..
from project page:
Hmm, I need to fix this text, as it does not work any more.
Comment #7
Pasqualleso the correct syntax is:
[view:Timeline==1809--1819]
if you create additional block display for the limit, then the syntax is:
[view:Timeline=block_1=1809--1819]