Example Page - Beta 1.3

This script will insert one example basepage, 3 templates, 3 CSS Snippets and one URL so that you can test the Framework.

Use the following URL once all the steps have been completed.

http://www.YourSite.com/Example.html

INSERT INTO [OBv3].[dbo].[CMSBasePage]
           ([CMSBasePageID]
           ,[Name]
           ,[Online])
     VALUES
           ('Example123'
           ,'Example Page'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSBasePage]
           ([CMSBasePageID]
           ,[Name]
           ,[Online])
     VALUES
           ('Example456'
           ,'Example Page 2'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSBasePageSettings]
           ([CMSBasePageSettingsID]
           ,[Version]
           ,[doctype]
           ,[Title]
           ,[MetaDescription]
           ,[MetaKeyWords]
           ,[FavIcon]
           ,[ShortcutIcon]
           ,[SettingsXML])
     VALUES
           ('Example123'
           ,1
           ,5
           ,'Example Page'
           ,'Example Page description'
           ,'Example, Page, OBiCMS'
           ,''
           ,''
           ,'<?xml version="1.0" encoding="ISO-8859-1"?>
		<OBi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<page>
				<template name="ExampleTemplate" id="Example123">
					<template name="Layout Example 1" id="Example456">
						<template name="NameOfTemplateExample3" id="Example789" />
					</template>
				</template>
			</page>
	    </OBi>')
GO
INSERT INTO [OBv3].[dbo].[CMSBasePageSettings]
           ([CMSBasePageSettingsID]
           ,[Version]
           ,[doctype]
           ,[Title]
           ,[MetaDescription]
           ,[MetaKeyWords]
           ,[FavIcon]
           ,[ShortcutIcon]
           ,[SettingsXML])
     VALUES
           ('Example456'
           ,1
           ,5
           ,'Example Page 2'
           ,'Example Page description 2'
           ,'Example, Page 2,'
           ,''
           ,''
           ,'<?xml version="1.0" encoding="ISO-8859-1"?>
		<OBi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<page>
				<template name="ExampleTemplate" id="Example123">
					<template name="Layout Example 1" id="Example456">
						<template name="NameOfTemplateExample3" id="Example012">
                                                	<widget name="SimpleWidget1" type="ExampleWidgets.SimpleWidget, ExampleWidgets" id="$$#SimpleWidget#$$" />
                                                </template>
					</template>
				</template>
			</page>
	    </OBi>')
GO
INSERT INTO [OBv3].[dbo].[LK_CMSBasePage_CMSBasePageSettings]
           ([LK_CMSBasePage_CMSBasePageSettingsID]
           ,[CMSBasePageIDC]
           ,[CMSBasePageSettingsIDC])
     VALUES
           ('Example 1'
           ,1
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSBasePage_CMSBasePageSettings]
           ([LK_CMSBasePage_CMSBasePageSettingsID]
           ,[CMSBasePageIDC]
           ,[CMSBasePageSettingsIDC])
     VALUES
           ('Example 2'
           ,2
           ,2)
GO
INSERT INTO [OBv3].[dbo].[URLRewriteJob]
           ([URLRewriteJobID]
           ,[CMSBasePageIDC]
           ,[Pattern]
           ,[QueryString])
     VALUES
           ('Example123'
           ,1
           ,'(/Example.html)'
           ,'')
GO
INSERT INTO [OBv3].[dbo].[URLRewriteJob]
           ([URLRewriteJobID]
           ,[CMSBasePageIDC]
           ,[Pattern]
           ,[QueryString])
     VALUES
           ('Example456'
           ,2
           ,'(/Example2.html)'
           ,'')
GO
INSERT INTO [OBv3].[dbo].[CMSTemplate]
           ([CMSTemplateID]
           ,[Name])
     VALUES
           ('Example123'
           ,'Example Template 1')
GO
INSERT INTO [OBv3].[dbo].[CMSTemplate]
           ([CMSTemplateID]
           ,[Name])
     VALUES
           ('Example456'
           ,'Example Template 2')
GO
INSERT INTO [OBv3].[dbo].[CMSTemplate]
           ([CMSTemplateID]
           ,[Name])
     VALUES
           ('Example789'
           ,'Example Template 3')
GO
INSERT INTO [OBv3].[dbo].[CMSTemplate]
           ([CMSTemplateID]
           ,[Name])
     VALUES
           ('Example012'
           ,'Example Template 4')
GO
INSERT INTO [OBv3].[dbo].[CMSTemplateSettings]
           ([CMSTemplateSettingsID]
           ,[Version]
           ,[Body]
           ,[Javascript]
           ,[Online])
     VALUES
           ('Example123'
           ,1
           ,'<div>
			{Layout Example 1}
			</div>'
           ,'// Example Javascript 1'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSTemplateSettings]
           ([CMSTemplateSettingsID]
           ,[Version]
           ,[Body]
           ,[Javascript]
           ,[Online])
     VALUES
           ('Example456'
           ,1
           ,'<div>
	     Layout Template
 	     {NameOfTemplateExample3}
	     </div>'
           ,'// Example Javascript 2'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSTemplateSettings]
           ([CMSTemplateSettingsID]
           ,[Version]
           ,[Body]
           ,[Javascript]
           ,[Online])
     VALUES
           ('Example789'
           ,1
           ,'<div>
			Hello World
			</div>'
           ,'// Example Javascript 3'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSTemplateSettings]
           ([CMSTemplateSettingsID]
           ,[Version]
           ,[Body]
           ,[Javascript]
           ,[Online])
     VALUES
           ('Example012'
           ,1
           ,'<div>
	     Hello World from Template 4
	     {SimpleWidget1}
             </div>'
           ,'// Example Javascript 4'
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplate_CMSTemplateSettings]
           ([LK_CMSTemplate_CMSTemplateSettingsID]
           ,[CMSTemplateIDC]
           ,[CMSTemplateSettingsIDC])
     VALUES
           ('Example123'
           ,1
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplate_CMSTemplateSettings]
           ([LK_CMSTemplate_CMSTemplateSettingsID]
           ,[CMSTemplateIDC]
           ,[CMSTemplateSettingsIDC])
     VALUES
           ('Example456'
           ,2
           ,2)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplate_CMSTemplateSettings]
           ([LK_CMSTemplate_CMSTemplateSettingsID]
           ,[CMSTemplateIDC]
           ,[CMSTemplateSettingsIDC])
     VALUES
           ('Example789'
           ,3
           ,3)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplate_CMSTemplateSettings]
           ([LK_CMSTemplate_CMSTemplateSettingsID]
           ,[CMSTemplateIDC]
           ,[CMSTemplateSettingsIDC])
     VALUES
           ('Example789'
           ,4
           ,4)
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippet]
           ([CMSCSSSnippetID]
           ,[Name])
     VALUES
           ('Example123'
           ,'Example Css 1')
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippet]
           ([CMSCSSSnippetID]
           ,[Name])
     VALUES
           ('Example456'
           ,'Example Css 2')
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippet]
           ([CMSCSSSnippetID]
           ,[Name])
     VALUES
           ('Example789'
           ,'Example Css 3')
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippetSettings]
           ([CMSCSSSnippetSettingsID]
           ,[Version]
           ,[Body]
           ,[Type]
           ,[Online])
     VALUES
           ('Example123'
           ,1
           ,'/* Css Example 1 */
			body {background-color:#CCC}'
           ,7
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippetSettings]
           ([CMSCSSSnippetSettingsID]
           ,[Version]
           ,[Body]
           ,[Type]
           ,[Online])
     VALUES
           ('Example456'
           ,1
           ,'/* Css Example 2 */'
           ,7
           ,1)
GO
INSERT INTO [OBv3].[dbo].[CMSCSSSnippetSettings]
           ([CMSCSSSnippetSettingsID]
           ,[Version]
           ,[Body]
           ,[Type]
           ,[Online])
     VALUES
           ('Example789'
           ,1
           ,'/* Css Example 3 */'
           ,7
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSCSSSnippet_CMSCSSSnippetSettings]
           ([LK_CMSCSSSnippet_CMSCSSSnippetSettingsID]
           ,[CMSCSSSnippetIDC]
           ,[CMSCSSSnippetSettingsIDC])
     VALUES
           ('Example123'
           ,1
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSCSSSnippet_CMSCSSSnippetSettings]
           ([LK_CMSCSSSnippet_CMSCSSSnippetSettingsID]
           ,[CMSCSSSnippetIDC]
           ,[CMSCSSSnippetSettingsIDC])
     VALUES
           ('Example456'
           ,2
           ,2)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSCSSSnippet_CMSCSSSnippetSettings]
           ([LK_CMSCSSSnippet_CMSCSSSnippetSettingsID]
           ,[CMSCSSSnippetIDC]
           ,[CMSCSSSnippetSettingsIDC])
     VALUES
           ('Example789'
           ,3
           ,3)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplateSettings_CMSCSSSnippet]
           ([LK_CMSTemplateSettings_CMSCSSSnippetID]
           ,[CMSTemplateSettingstIDC]
           ,[CMSCSSSnippetIDC])
     VALUES
           ('Example123'
           ,1
           ,1)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplateSettings_CMSCSSSnippet]
           ([LK_CMSTemplateSettings_CMSCSSSnippetID]
           ,[CMSTemplateSettingstIDC]
           ,[CMSCSSSnippetIDC])
     VALUES
           ('Example456'
           ,2
           ,2)
GO
INSERT INTO [OBv3].[dbo].[LK_CMSTemplateSettings_CMSCSSSnippet]
           ([LK_CMSTemplateSettings_CMSCSSSnippetID]
           ,[CMSTemplateSettingstIDC]
           ,[CMSCSSSnippetIDC])
     VALUES
           ('Example789'
           ,3
           ,3)

Last edited Jul 6, 2010 at 11:01 AM by Cadey, version 5

Comments

No comments yet.