Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Importing 300+ categories
Yeah, the title is true.. I have a situation where I must import hundreds of categories, nested et al, into Textpattern, to be the subject of a mass pruning and/or renaming process later on. I’ve managed to get the “parent” stuff right for every entry. Trouble is, how do I generate the correct lft/rgt values? I can get the list working (somewhat slow though ;) but when I start editing it, they all disappear with some errors at the top, seems to be a lft/rgt issue somewhere.
Any help appreciated,
/Anton
Last edited by Anton (2005-11-22 13:39:36)
Offline
Re: Importing 300+ categories
Forgot to mention: Most of these categories will be nested and used as navigation à la subsections. It’s not ideal, at all, but the site is pretty large and the info has to be divided into smaller entities, down to at least 3-4 levels. Any ideas of how to do this without using categories as navigation is welcome too. Even if it meens recommending another CMS (haven’t found one as fun to use as TXP though)
Offline
#3 2005-11-22 16:53:13
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Importing 300+ categories
Even if it meens recommending another CMS (haven’t found one as fun to use as TXP though)
Have a look at this (not tested by myself).
Nico
Offline
Re: Importing 300+ categories
thanx for the info. however, and to my rescue, I had miscalculated the number of categories this time – it was more around 90 than 300 :) which means I can stay with Textpattern, at least I hope.
Offline
#5 2005-11-22 22:37:23
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Importing 300+ categories
I’ve got 289 categories to insert into a site : ) it’ll be a long hour
haven’t investigated yet, but might as well make use of your timely thread… to make navigation functional using category select lists, the 289 cats will be divided among 7 parent categories… would it be feasible to attempt a chained select ?
(I think that’s what they’re called, where the choice in the first select sets the values of the second select)
Offline
Re: Importing 300+ categories
nardo: you mean in the admin interface? that would require some hacking, i think. on the public side, this could probably be done, in some way.. (don’t know how though)
Offline
#7 2005-11-23 03:32:17
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Importing 300+ categories
Trouble is, how do I generate the correct lft/rgt values?
call the rebuild_tree() function. grep for examples.
Alex
Offline
Re: Importing 300+ categories
thanx, zem! i’ll try that..
Offline
Pages: 1