21310 Posts in 5739 Topics by 2604 members
|Go to End|
5 May 2011 at 3:50am
Is there a way to change the page type of a large collection of pages in one action?
For example, if someone entered in 100 press release pages, and selected the wrong page type for every one of them, is there anything I can do besides clicking into each one individually and changing the type on the Behavior tab?
I am familiar with sql, so if there's a relatively-safe backhanded way of doing it, I'm OK with that.
5 May 2011 at 4:27am
this should work (i.e. UNTESTED)...
UPDATE SiteTree SET ClassName='NewClass' WHERE ClassName='OldClass';
UPDATE SiteTree_Live SET ClassName='NewClass' WHERE ClassName='OldClass';
UPDATE SiteTree_versions SET ClassName='NewClass' WHERE ClassName='OldClass';
6 May 2011 at 7:13am
@swaiba - Thanks, that was the approach that worked -- though I did where ParentID = X instead, since it was only one group of pages with the problem and not all pages of the first type.
|Go to Top|