Jump to content

csv.txt import option in Tab Children - Pagetree

Recommended Posts

To increase usuability and much faster working when setting up a site it would be great to have a field for csv,txt data to be imported as new pages.

Already there is a csv import module which is working good but to work fast in creating a pagetree or several subpages with several templates assigned each it is slow as you need to create the parentpage in pagetree than click - click to the csv import module and again you need to select the right template and the pagetreepage and than you can import.

While the csv import module as a immediate switch to go to the pagetree after an import it would be nice to have the same vice versa and even much much better to have simply the csv import integrated in to the child page TAB field.


There is also no way to get back to the Children TAB after yo have created one Children Page. It would be good that there is a way to get immediately back to the Children Tab of a Page after creating the first, than the second etc page.

Right now it is cumbersom

Click on Add new page in children tab and the new page gets created, you save and publish it (actually it would be also good to have a way to save and publish in one step)
than you need to click on the breadcrumb to get to the parentpage, which loads the complete pagetree, which is actually not needed right now as you only want to create the next children Page from the Children Tab "Add Page"


Share this post

Link to post
Share on other sites

For the first part, how many pages are you importing with the ImportPagesCSV? Sounds like a lot if you are importing data to multiple locations in the tree so if it is something quite complex then you may be better off using the PW API and some custom PHP using a function like http://php.net/manual/en/function.fgetcsv.php to read through the CSV file and getting the API to do the importing.

Some useful topics that may help:

For the second question - going back to the Children tab after creating one child page, check out the excellent Admin Save Actions module by Nik and you can select what happens after you save a page. Very useful if you are doing a lot of new pages/edits.

Share this post

Link to post
Share on other sites

Hi Pete

Importing depends on the customer needs. If we import i.e. 30.000 and more pages we usually use the csv import module anyway. But if you have to create subpages or add some more subpages to a tree it is way easier to simply type or copy paste them in a field and click and they are there.







click and done!
(subs is no page but defines the column. The import module does not import the first value (column header) in the list!

The import of csv has the possibility to do exactly that. In other words it would be great to have that field on the Children Tab. This makes it very very easy to create a structure on the fly and it is fast, much faster and much more comprehensive than any api stuff by the way.

Unfortunately this module you mentioned does not offer an option to save and publish and than return to the children Tab to add another page, but it is quite useful as it can remember the settings you have chosen.

Perhaps there is a way to publish all pages of a branch in one step as otherwise it is a click and click and ... action with waiting for the pagetree to reload every time.

The Admin save module is marked as not compatible with 2.5 branch - if it is compatible it would be great if that gets adjusted. This is also with a lot of other modules where there is no 2.5 compatibility. In Terms of easy understanding and usability it would be great if module developers would update their modules and if it is only adding the "2.5". This also shows that the module get's still some attention by the developer and gets maintained. We already had contacted developers of modules and they were no more working with Process for several reasons, but in that case it would be advised that those modules get marked as no more maintained and offered to be maintained by somebody else. simply make a job offer "looking for new maintainer" and for sure there will be people stepping in there.

Share this post

Link to post
Share on other sites

Thanks Adrian for the hint

The point is not that there isn't a module existing which woudl handle the problem it is more that it would be much more usefull to have this field right in place.
Take the time:
Do setting up a complete Pagetree where you add several child branches step by step. using the csv import module, the batch editor, manual and guess how much time it would take to simply copy paste or even write the child pages into that field and click and they are there. Similar to the profields it is so much faster!

Having right in that child Tab an option to setup more than one page at once and even to sort them a-z, z-a or manually, is in point of economical workflow for developers the best option. And it is much more usable and does not at all produce an overhead.


Share this post

Link to post
Share on other sites
The point is not that there isn't a module existing which woudl handle the problem it is more that it would be much more usefull to have this field right in place.

If I understand correctly, that is exactly what Batch Child Editor does. It has a new section under the Children tab where you can paste the names of the new child pages to be created. Check out the screenshots here: https://processwire.com/talk/topic/6102-batch-child-editor/

Share this post

Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By nickngqs
      Does anyone know how to do an export of a page entries to CSV using the Processwire way?
      I'm trying to setup a list where the client can see a list of user's form values.

      Example ->
      A front end form -> Upon submit -> Adds to database -> Shows on the admin of Processwire.

      From there, I can see the entries and sort stuff. And lastly I can export them in CSV.

      I'm looking at the Processwire cheatsheet and see the $files, is this the one I should be looking at? 
    • By benbyf
      Been updating fields on a live site from my dev site to get them in synch and I noticed repeater pages visible in my pagetree on teh live site. What might I have done to have this happen? The repeater module was enabled on both sites.

    • By hellomoto
      Pressing problem at initial posting:  I am working on a module that runs/previews (for pub/unpub) imports on importer page view. The template has to be in site/templates, so far as I know, so one is created there on install which includes a file to run from within the module, but then when it's run and tries to read the importer csv file it cannot, since it's in the admin, I guess... Is it possible to set the template page to a file in the module directory? Will that work?
    • By Xonox
      I updated a site from version 2. something, can't recall for sure, to version 3.0.39. All is working fine on local server. However, when I uploaded to online server, the page tree display stopped working.
      1. Whenever I try to access the page tree it gives an alert with the text: Uknown error, please try again later
      On the console I can see the following:
      GET http://mysite.com/admin/page/list?id=1&renderJSON&start=0&open=undefined&mode=actions 500 (Internal Server Error) JqueryCore.js?v=1478723146:2
      2. Whenever I try to access the page children (when editing a page) it gives an alert with the text: Uknown error, please try again later
      On the console I can see the following:
      Failed to load resource: the server responded with a status 500  http://mysite.com/admin/page/list?id=1040&renderJSON&start=0&lang=0&open=undefined&mode=actions (Internal Server Error)
      When I was updating, I got an error on the site config.php file. I forgot to update the $config->httpHosts for the domain in the new server, which was corrected after the update.
      The server is running PHP 5.4, MySQL 5.5.52, PW updated to 3.0.39
      Any clues?
    • By hellomoto
      Would anyone here be able and inspired to develop a ProcessWire equivalent to the WordPress plugin WP All Import Pro? or to help me do so?
      This is what I'm envisioning...
      Upon installation the module creates an admin page titled "Import & Update". On the module config page you can specify allowed templates to run this on, otherwise allowing any. Include the following PHP libraries: hQuery for web scraping, Csv for CSV handling, and Parser for XML. Create template "import-update". On the "Import & Update" page, a list of current import/updaters will be displayed (0 initially), each with corresponding links to "edit" or "run". When you "Add New", this be the "import-update" template (with all module-specific fields tagged "impupd"):
      title destination (req.): parent, template source (req.): type (web, csv, xml) location (url, file, text) if web: opt. index URL & link selector, + paginator selector if csv: opt. ignore 1st row if xml: req. individual item node xpath actions (check): import (if none matching UID) update (if matching UID & field values differ) save() [req. here in flow] map (repeater): input (select fields from specified template to affect) intake (corresponding DOM selectors / CSV col. letters/headers / xpath per field) (req.) UID (unique ID; field reference to compare against, from selected input fields) (req.) Lazy Cron interval Scripts can be run via the import-update template; keep logs; show preview (iframe/ajax) for manual runs. ...
  • Create New...