Problem/Motivation

Currently the CSV file path, which you set in the "Query settings" form under "Advanced" accepts global tokens like [site:url]. However, it does not accept tokens like {{ raw_arguments.value}}.

Enabling the use of these tokens allows context-based switching of the source CSV, which can enable you to have multiple smaller CSVs rather than one large CSV, which can be slow to parse. An example could be commodity data by region within a country. In this case, you could have a file like:

commodity_data_all.csv that only contains the columns - this will allow you to use the column selector when configuring your view.

Your main data will be in:
commodity_data_region_1.csv
commodity_data_region_2.csv
commodity_data_region_3.csv
...

Which you will represent in the file path like (for example):
/sites/default/files/commodity_data_{{ raw_arguments.value}}.csv

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andileco created an issue. See original summary.

andileco’s picture

Assigned: Unassigned » nikathone
Status: Active » Needs review

Nia, please review.

andileco changed the visibility of the branch 3555506-enable-views-token to hidden.

andileco’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.