Created
March 30, 2016 09:59
-
-
Save em-piguet/58d4750568845697ae0e49627ee88821 to your computer and use it in GitHub Desktop.
How to convert an MODX articles container to a MODX collections container...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch ArticlesContainer -> CollectionContainer | |
# the res. ID I want to migrate is 11 | |
UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'ArticlesContainer', 'CollectionContainer') WHERE id=11; | |
# switch class_key to go back to default document view for children | |
UPDATE `modx_site_content` SET `class_key` = replace(class_key, 'Article', 'modDocument') WHERE parent=11; | |
# Change template 49 -> 57 | |
UPDATE `modx_site_content` SET `template` = replace(template, '49', '57') WHERE parent=11; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A little less is more (you only have to change the template id - if needed):