Jump to content

Recommended Posts

Posted

When importing pages from a csv file with ImportPagesCSV they are only active in the default language. Is it possible to make them active all at once in all languages, on import or afterwards?

I tried ProcessBatcher but it doesn't support this.

Maybe someone has another solution...

Posted

I'm importing students names for a school website, so only the 'students' template needs to be active in all languages. I can find that in the script but my next question is where I can find the page-creation API script to add the code.

Posted

You can just run this code after you imported your students as usual. Paste the code in /site/templates/admin.php before the existing line in it. This file is called for each request to the admin UI and it's a simple place for one time code. Alternatively you could also use a manually created /site/ready.php file (since pw version 2.6.7), which would be called on each request to processwire. Change up the $pages->find() call in the script and visit any site in the backend. After that just comment out the script lines, so they won't get executed twice, and check if every languages are now active.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...