ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Mass import of categories?

April 14, 2008 6:03am

Subscribe [2]
  • #1 / Apr 14, 2008 6:03am

    Lindstrom

    30 posts

    Hi,

    I intend to use the rating module (Solspace) for building a rating-community-tool. Therefore I have to make most extensible use of the categories. In fact I intend to set more than 13k for one weblog. But I can“t type all manually. How can I import these 13k categories automatically?

    Thanks and best regards,

  • #2 / Apr 14, 2008 8:00am

    Sue Crocker

    26054 posts

    You’ll find that 13k worth of categories will slow down the system. I had imported quite a few, but it just made things like picking out a category to use with an entry unmanageable.

    What kinds of categories would you need to create?

    I wrote PHP code to import from a .csv file.

  • #3 / Apr 14, 2008 8:28am

    Lindstrom

    30 posts

    Thanks for your message. The categories will be cities that will be rated by the rating module. What do you mean with “slow down the system”? Do you mean the admin area or the front-end as well? Is EE not able to handle such a project?

  • #4 / Apr 14, 2008 1:31pm

    Sue Crocker

    26054 posts

    The admin area. What I did was to figure out another method of using weblogs and categories instead. In my case I had US states as sub categories to other things. so I was adding 51 extra categories to each main category. I just split out the states into their own category.

  • #5 / Apr 14, 2008 1:56pm

    Lindstrom

    30 posts

    Thanks a lot. Splitting is a good hint. I could spilt into the states which would lower the amount of categories for each weblog.

    But there is one question left: How can I import the cities as categories automatically?

  • #6 / Apr 14, 2008 2:40pm

    Sue Crocker

    26054 posts

    Custom code. I read the contents of a .csv file in and based on the text, I added the two rows I needed to the database.

    I created my top level categories first, then added the subcategories as I went. It wasn’t automated in the sense of having an official plugin or anything.

    Lots of trial and error and I made backups of the two tables before attempting.

    HowTo Automate Adding Categories

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases