Hi I’m looking to create page with content from csv. Just like this example but without create virtual page (Animal). Yeah I don’t need that sub page when generated static content for my website.
Would You mind help me with models? I have very little experience on php. Thank You in advance.
If you just want to create pages in the file system and not virtual pages, then you don’t need models but just a script that reads the data from the .csv files and creates the pages using Page::create()
or $page->createChild()
.
Hi Texnine. Thank You for reply. is it like this example?
So I put it on template?
Yes, that method creates a new page. Note that you either need to be logged in or use $kirby->impersonate('kirby')
because the method needs authentication.
You can put this code into a template, controller, route or a separate script.