Hello,
I had to do this with DNN Creative, here is an example SQL statement I use below, it should give you an idea of what is possible, basically you need to analyse what modules you need to move where and how the data is stored in the tables, from there you can write SQL to automate the process - this saved me days of work when I created the new CSS skin for DNN C:
********* Full procedure for tab id changes, run this for each tab to assign skin, containers, move modules etc. **********
DECLARE @TabIDEdit int -- Change the Tab id here -- SET @TabIDEdit = 199 DECLARE @newSkin nvarchar(200) DECLARE @newContainerSrc nvarchar(200) DECLARE @newPageHeadText nvarchar(500)
-- Change the Page Settings -- UPDATE Tabs SET @newSkin = SkinSrc, SkinSrc = '[G]Skins/07/dnncreative_tutorials.ascx' WHERE TabID = @TabIDEdit
UPDATE Tabs SET @newContainerSrc = ContainerSrc, ContainerSrc = '[G]Containers/07/transparent_h1_title.ascx' WHERE TabID = @TabIDEdit
UPDATE Tabs SET @newPageHeadText = PageHeadText, PageHeadText = '' WHERE TabID = @TabIDEdit
SELECT * FROM Tabs WHERE TabID = @TabIDEdit
-- Delete Modules that are no longer needed from the tab -- DELETE FROM TabModules WHERE TabID = @TabIDEdit and ModuleID = 574 OR TabID = @TabIDEdit and ModuleID = 666 OR TabID = @TabIDEdit and ModuleID = 392 OR TabID = @TabIDEdit and ModuleID = 484 OR TabID = @TabIDEdit and ModuleID = 451 OR TabID = @TabIDEdit and ModuleID = 637 OR TabID = @TabIDEdit and ModuleID = 425 OR TabID = @TabIDEdit and ModuleID = 507 OR TabID = @TabIDEdit and ModuleID = 657 OR TabID = @TabIDEdit and ModuleID = 407 OR TabID = @TabIDEdit and ModuleID = 418 OR TabID = @TabIDEdit and ModuleID = 1072 OR TabID = @TabIDEdit and ModuleID = 637 OR TabID = @TabIDEdit and ModuleID = 430
-- Move modules to the content pane that are not assigned to the left or right panes --
DECLARE @newPaneName2 nvarchar(50)
UPDATE TabModules SET @newPaneName2 = PaneName, PaneName = 'ContentPane' WHERE TabID = @TabIDEdit and PaneName <> 'LeftPane' and PaneName <> 'RightPane'
SELECT * FROM TabModules WHERE TabID = @TabIDEdit and PaneName <> 'LeftPane' and PaneName <> 'RightPane'
-- Insert copy of Banner module from advertisers page into current tab --
Insert INTO TabModules (TabID, ModuleID, PaneName, ModuleOrder, CacheTime, Alignment, Visibility, ContainerSrc, DisplayTitle, DisplayPrint, DisplaySyndicate) VALUES (@TabIDEdit, 1103, 'rightpane', 1, 0, 'center', 0, '[G]Containers/07/transparent_h3_title.ascx', 'True', 'False', 'False')
|