I am using a .csv file built to create virtual pages for each location listed in the CSV. It is functioning correctly.
The question is: How can I store data from the CSV into the blueprint (generated) of each location, utilizing a specific field type? For example, I want to use the locator plugin to assign latitude and longitude values based on the address provided.
For that use case, you need to mix content that exists in the file system (page content file), with the data from your virtual pages, see Merging content sources | Kirby CMS
By the way, you don’t store data in the blueprint but in the content file.
ok, so the question is: can i use data from .csv to generate pages, and for each page use the information about “address” [column of the .csv] writing them into the content file in a “locator” field [that generate lat and lng dinamically]?
Thank you for your answers.
Ok, so you don’t want to keep the virtual pages but create page in the file system from the data in the .csv? That is of course possible as well, see also: Page::create() | Kirby CMS
As regards filling the field values, I don’t think this is possible in a PHP script, because there are no methods provided in the plugin to do this backend side. The mapbox API queries happen in the frontend part, i.e. the vue files.
So, yes, you can do it, but would have to do the API queries in your PHP.