Hello all,
I’ve been working on a snippet/PHP script that will migrate Wordpress post data over to a ModX database. So far I seem to have most of the kinks worked out in testing. I do have some areas that I’m not sure how to handle, though, and I’d like some feedback.
1) WordPress categories.
Tags are easy to handle, but I’m not sure about categories. In WordPress, these are simply ’keywords’ which are used to build indexes. You click on CatX, and you get everything with the "CatX" keyword, so to speak.
In ModX, though, categories would need to be actual documents: parents that contain children. Considering that one post in WordPress can have multiple categories, this is going to be (pardon the language) a bitch to set up. Sure, I could make a blank document and mark it as "isfolder" in ModX, and try to place children underneath it, but as soon as I get a document with more than one category.... ew.
Any ideas on how to handle it?
2) ModX "parent" and "isfolder".
Given the problems with making WordPress content into folders/children/parents, I’m strongly leaning towards just setting "parent" and "isfolder" to "0" in both cases, and let people use Doc Manager to sort it out later. Other suggestions are welcome.
3) ModX "menuindex."
WordPress has a menu order variable, but it appears to only be used for pages (not posts), and it isn’t a reliable index. You can set it to *anything* -- 50, 100, 1000 -- with the only result being that the higher numbers are ordered after the lower numbers. This would also work with ModX, I suppose, but it seems messy. Would it be preferable to let the menuindex autoincrement, and people can re-order it later, or respect the WordPress menu order in some manner and go from there?
Thanks for the input!
1. See
http://modxcms.com/forums/index.php/topic,35926.msg217059.html#msg217059
2. Using isfolder (container) is nice for Ditto etc. when you you want a resource to be
showing up as a container even though it’s empty.
3. You can choose to sort your documens by any
Document Object or TV, but menu index is nice
when you build your own menus (manager). It’s hard to be reliable when you have publishers
editing and deleting.
//Maybe I should read the post and title before I write replies...
-
MODX Staff
- 2,502 Posts
For your migrated content why not prefix the ID with another number such as 1 or 2 where id 15 becomes 115 or 215 granted that would be an issue if you had more than 100 posts.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
I found a way to generate new auto_increment IDs for the migrated content and track them correctly through the assorted tables. As far as I can tell, everything works! I’m going to test it a bit more this week, as I suspect I’ll have unpleasant surprises with links and URLs in the migrated content, but I’m pretty darn happy with how it’s working so far.
-
MODX Staff
- 12,272 Posts
It would be really cool to see you package up what you’ve got and to share it in the In Development forum topic so others could either contribute or learn from your experiences. Add in Disqus or Echo and the ping/trackback solution from the Japanese community and you’ve got a MODx blogging platform that’s pretty darned cool!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Thought I’d mention that in MODx Revolution, there are real categories that can be attached to resources or elements and they are much more tag-like than in Evolution. I think the conversion would be much more straightforward in Revolution.
-
☆ A M B ☆
- 872 Posts
That’s interesting BobRay. You mean that we don’t have to create tv based categories with Revolution?
Any pointer for that functionality, i can’t see it anywhere.