-- ********************************************************** -- SQL Server 2000 Edition of database script with content. -- SubSonic StarterKit v2.01 -- Version 1.00 -- ********************************************************** SET NOCOUNT ON -- Remove old tables IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='CMS_Page') Begin ALTER TABLE CMS_Page DROP CONSTRAINT PK_CMS_Page; DROP TABLE CMS_Page; END IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='CMS_Content') Begin ALTER TABLE CMS_Content DROP CONSTRAINT PK_Content; DROP TABLE CMS_Content; END -- Create tables CREATE TABLE dbo.CMS_Content ( ContentID int IDENTITY(1,1) NOT NULL, ContentGUID uniqueidentifier NOT NULL DEFAULT (newid()), Title nvarchar(500) NULL, ContentName nvarchar(50) NOT NULL, Body ntext NULL, Locale nvarchar(7) NOT NULL DEFAULT (N'en-US'), CreatedOn datetime NULL DEFAULT (getdate()), CreatedBy nvarchar(50) NULL, ModifiedOn datetime NULL DEFAULT (getdate()), ModifiedBy nvarchar(50) NULL ); CREATE TABLE dbo.CMS_Page ( PageID int IDENTITY(1,1) NOT NULL, Title nvarchar(500) NOT NULL, Body ntext NULL, Locale char(5) NOT NULL DEFAULT ('en-US'), ParentID int NULL, PageGuid uniqueidentifier NOT NULL, MenuTitle nvarchar(50) NOT NULL, Roles nvarchar(500) NOT NULL DEFAULT (N'*'), Summary nvarchar(500) NULL, PageUrl nvarchar(500) NOT NULL, Keywords nvarchar(500) NULL, CreatedOn datetime NOT NULL DEFAULT (getdate()), CreatedBy nvarchar(50) NULL, ModifiedOn datetime NOT NULL DEFAULT (getdate()), ModifiedBy nvarchar(50) NULL, Deleted bit NOT NULL DEFAULT ((0)) ); -- Insert Data SET IDENTITY_INSERT dbo.CMS_Content ON; INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(4, '475FCF25-A5C4-496A-8E97-2E6A2F4F033D', NULL, N'Porky''s Thinking of BeefContent', N'

Recursion is one of those geek Camaro-qualities, where Big Guy Geek might say "well you know MY recursive method only uses the stack and has 16-inch centerlines" (or something like that). I remember sitting in my Pascal class and our class was on outputting an org chart. Now in those days you handed your work in from a green and white-striped line printer :). Anyway, the prof always gave the person with the fewest lines of code a 10-point bonus.

So I thought I was pretty good at Pascal. I liked it a lot better than basic cause, well, in MY mind it was all about top-down design :). When all was said and done the Big Guy Geek who got the extra credit (umm, not me) had about 10 times less code than I did. And 16-inch centerlines. All through the lovely use of recursion. It''s never come easy to me, but from time to time I''m able to pull it off. This was NOT one of those times - the bits below come from here.

Recursion Sucks. Recursion Rules.
So I have a need to do something simple: represent a self-referencing table in a nice, human-readable way:

', N'en-US', '20070302 13:07:29', N'', '20070302 13:13:09', N''); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(5, '97A119C2-127C-421D-A790-D666ED2AD16A', NULL, N'My List1', N'This is a list thing', N'en-US', '20070302 13:55:50', NULL, '20070429 14:04:00', N''); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(6, '7EE2F567-C3F9-48EF-9A8B-A8742BC1DE06', NULL, N'My List2', N'This is my other list thing', N'en-US', '20070302 16:15:34', NULL, '20070302 17:15:07', N''); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(7, '84B0689B-C35E-47FB-A87F-E089B9B64B10', NULL, N'My List', N'This is an item. Thanks.', N'en-US', '20070302 17:06:15', N'', '20070429 14:03:56', N''); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(8, 'F00599C4-547B-4CB5-BF37-F29102E1D89E', NULL, N'My List', N'This is my list item number 4. I hope it goes there...', N'en-US', '20070302 17:08:41', N'', '20070429 14:04:00', N''); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(9, '2A952DD4-9FE6-452D-9DC8-9FBECAAA5ED1', NULL, N'DefaultExample', N'It''s Me, Freaky

', N'en-US', '20070507 16:35:31', N'admin', '20070507 16:49:55', N'admin'); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(10, 'BC675996-5F6C-4D1D-A511-0F9B10737AD5', NULL, N'termsofuse', N'

Terms of Service

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam faucibus arcu sed lectus. Vestibulum feugiat felis quis libero. Donec feugiat leo id urna. Aliquam vel quam. Morbi nunc ante, vehicula at, eleifend sit amet, pharetra non, lectus. Cras pharetra nulla a diam. Mauris bibendum interdum tortor. Aenean et arcu ac pede vestibulum consequat. Aliquam nulla. Quisque posuere. Vivamus nunc. Curabitur ac velit a massa ornare auctor. Donec condimentum dictum dui. Nullam tellus leo, porta vel, vestibulum a, pellentesque at, nulla.

Duis non velit vel sapien commodo cursus. Donec non eros. Nulla facilisi. Ut erat mi, euismod at, commodo sed, suscipit non, nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum nec tortor sed dui interdum consectetuer. Vestibulum pellentesque ullamcorper turpis. Nulla rutrum pellentesque est. Etiam elementum. Sed dolor sem, fermentum ut, posuere nec, lobortis eu, eros. Curabitur magna elit, ullamcorper nec, malesuada in, consequat a, elit. Curabitur pharetra mollis tortor. Aenean neque purus, lacinia ut, eleifend sit amet, malesuada et, tellus. Donec eget purus vel pede hendrerit dapibus. Duis facilisis. Nulla aliquet. Sed est.

Curabitur magna tellus, congue bibendum, iaculis id, luctus vel, nulla. Nam imperdiet quam id urna. Cras eget tellus. Phasellus ornare. Praesent auctor consectetuer elit. Morbi vel lectus nec odio congue vulputate. Nullam dignissim purus eu nibh. Donec massa libero, pulvinar ac, venenatis a, tincidunt et, sem. Phasellus placerat tellus ut sapien. Vivamus dictum erat. Cras pellentesque, mauris ac molestie mattis, ipsum leo iaculis magna, ut pellentesque sapien nisi feugiat dolor. Phasellus ac augue. Sed fringilla faucibus ante. Vivamus commodo venenatis neque. Sed nisl. Vestibulum tristique posuere velit. Donec ullamcorper posuere tellus. Integer elit mi, placerat sit amet, volutpat quis, tempus eget, odio. Donec augue. Maecenas dolor est, hendrerit lobortis, lacinia sed, hendrerit a, ligula.

Fusce neque massa, porttitor et, commodo eget, consectetuer euismod, sapien. Donec a enim nec pede ultrices blandit. Morbi sit amet dolor imperdiet dolor ultrices luctus. Mauris dictum, tortor non bibendum dignissim, risus elit condimentum erat, sed mollis nunc lorem in quam. Vestibulum malesuada rhoncus metus. Phasellus est. Donec ultrices. Donec nulla nisi, blandit non, laoreet vitae, ultrices id, eros. Proin orci est, blandit venenatis, volutpat sit amet, fermentum eget, ante. Sed arcu. Maecenas auctor libero nec lectus. Vivamus luctus diam id dui. Sed accumsan metus. Cras felis libero, adipiscing nec, mattis at, condimentum sit amet, nisl. Nam sed nisi. Vestibulum laoreet purus a magna. Integer tempor nisl nec ante. Ut euismod enim condimentum pede.

Sed justo. Nullam accumsan porttitor massa. Donec nec augue vitae velit malesuada tempor. Aliquam elit nisi, tempor rutrum, accumsan quis, placerat ut, magna. Donec blandit. Aliquam eu dui ut felis scelerisque feugiat. Sed nisl pede, elementum ac, feugiat at, ornare tincidunt, nunc. Ut eu lacus. Suspendisse felis nisl, euismod scelerisque, faucibus mattis, pulvinar ut, velit. Cras eu libero id orci condimentum tincidunt. Nullam felis. Nullam nibh est, gravida eu, tempor eu, varius sed, est. Vivamus suscipit elit. Quisque eget velit. Cras rhoncus lectus egestas arcu. Duis aliquet lacus id enim. Nullam id lectus. Praesent dictum posuere tellus.

', N'en-US', '20070507 17:00:12', N'admin', '20070507 17:00:33', N'admin'); INSERT INTO dbo.CMS_Content(ContentID, ContentGUID, Title, ContentName, Body, Locale, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) VALUES(11, '96982994-6231-44CD-991D-D7CF73393577', NULL, N'default_welcome', N'

The SubSonic Starter Site is designed to help you get your ideas up quickly. We try to do the legwork for you, including:

Want to know more? Watch this webcast!

If you have any questions, please feel free to ask us at our forums: http://actionpack.wekeroad.com.

To Login: use "admin" as the login name, "admin" as the password. This will unlock all the CMS goodies for you. Come back to this page and you''ll see this whole paragraph turn blue! Then double-click it to edit it!

Quick Start

To get started right now, you''ll want to:

Questions?

Visit us any time on our forums!', N'en-US', '20070509 11:05:28', N'admin', '20070510 10:06:59', N'admin'); SET IDENTITY_INSERT dbo.CMS_Content OFF; SET IDENTITY_INSERT dbo.CMS_Page ON; INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(5, N'Using the SubSonic Starter Site', N'

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec eu mauris. Sed nulla. Sed turpis purus, rhoncus quis, commodo eu, bibendum ac, quam. Etiam eu pede. Maecenas sagittis aliquet velit. Integer fringilla. Aenean et tellus sed nibh fermentum sodales. Cras ac velit. Quisque tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla ut arcu et justo tincidunt dignissim. Proin elementum, magna eu condimentum tempor, neque diam eleifend tortor, sit amet vehicula quam massa sed tellus. Praesent pulvinar convallis lorem. Quisque arcu risus, euismod vel, cursus vitae, blandit sed, ipsum. Aliquam erat volutpat.

Donec nisi augue, condimentum vel, iaculis ac, vestibulum sed, dolor. Praesent ipsum arcu, accumsan quis, faucibus id, vulputate vitae, felis. Morbi quis purus. Nam ac urna. Nullam auctor auctor lectus. Duis accumsan turpis id orci. Aenean felis velit, luctus eget, hendrerit id, tincidunt ac, urna. Donec porta. Aliquam sagittis. Fusce sed purus. Sed ultricies nibh id arcu. Vestibulum quis felis vel mauris iaculis sollicitudin.

Duis sed dolor. In hac habitasse platea dictumst. Mauris ipsum. Curabitur ut neque sed magna lobortis sodales. Vestibulum tellus. Sed leo. Nulla sit amet pede mattis lectus fringilla gravida. Maecenas non ante ut ipsum tristique consequat. Sed malesuada feugiat urna. In ut felis a leo tristique pellentesque. Aenean quis enim. Nam pellentesque, purus sed iaculis elementum, lorem nisl placerat massa, sed lacinia tortor ipsum sed sapien. Pellentesque sit amet odio. Aenean suscipit nulla eget quam. Vestibulum et elit ac orci sagittis tincidunt.

Donec imperdiet est eu tortor. Donec lacinia, nisi non interdum gravida, magna mauris dignissim mi, at posuere justo leo eget arcu. Pellentesque luctus urna sit amet erat. Nullam nisi leo, sagittis a, rhoncus quis, posuere ut, enim. Phasellus a est id augue fermentum euismod. Donec arcu. Donec arcu. Vivamus eu sem. Morbi aliquam tristique felis. Proin tincidunt fringilla diam. Quisque lacinia viverra neque. Proin pede. Nulla nonummy lorem sit amet magna. Nulla vestibulum ultrices lacus. Aenean quis lorem et arcu lobortis semper.

Sed nunc. Aenean quis leo sit amet ipsum tincidunt pharetra. Nunc vel nulla at leo sagittis interdum. Vestibulum lobortis, justo vitae lacinia dapibus, lorem diam scelerisque massa, id pretium erat nulla in mi. Morbi risus. Praesent lacinia dolor et est. Duis et velit. Mauris turpis urna, fermentum at, gravida non, fermentum in, ipsum. Aenean blandit gravida felis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

', 'en-US', NULL, '600569F1-E4D8-4CDA-A32B-E2C089CC8F18', N'Using the Starter Site', N'*', N'This page will show you how to use the SubSonic Starter Site', N'robs-new-page-hi-mom.aspx', N'', '20070507 11:38:31', N'', '20070509 11:17:48', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(6, N'Pre-installed Components', N'When you first run the SubSonic Starter Site, you have:
', 'en-US', 5, '71670563-F0BF-4F10-A3BB-4ACE88DC34A2', N'Components', N'*', N'Learn what things come pre-installed with the SubSonic Starter Site!', N'my-new-page.aspx', N'', '20070507 12:01:30', N'', '20070509 11:37:28', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(15, N'Using the CMS Bits', N'When you install the Starter Site, all the code and data that you need are already setup for you. The site is pre-wired with the SubSonicCMS database in the App_Data folder. If you don''t want to use this database, you don''t need to! Just run the script in the App_Data folder against your favorite database and off you go.

We''ve appended everything with the prefix CMS_ so that you won''t have trouble merging this with other tables in your database (we know how conflicting naming is really a PITA). There are two core tables one view, and one SP that you''ll need to know about:

Tables

Stored Procedures

You will immediately notice, if you''ve used other CMS systems, that we don''t have versioning built in. This is by choice as we want to try to make this as simple a system as possible and, frankly, versioning might not be needed in all cases.

Dynamic Pages
This is a dynamic page, and you can edit it right here if you log in as "admin" with the password "admin". In fact all the pages in the menu above are dynamic (meaning they don''t really exist - they''re just database-driven pages that are written out with UrlRewriting). You can change the hierarchy around as you need, assign keywords, change summaries -and so on. It''s all up to you. Login as "admin" and head back over to see what kind of damage you can do.

If you want to change the menu around, you can do that in site.master.cs. In there you will see how we add in the Admin menuing for administrators on the fly.

FCK Editor
You''ll notice when you go to edit any of the CMS content that we use the FCK Editor. This thing is very powerful (and also big!) and allows you to do a level of file management as well. All files that you upload using the FCK Editor go into the CMSFiles directory - you have to make sure this has write privileges for your ASP identity.

You can change this for your users, if you want to allow them to load files into their own (or another directory). To get this to work, you''ll need to add a routine to the top of your page or User Control:

    protected void Page_Init(object sender, EventArgs e){

        txtContent.SkinPath = "skins/office2003/";

        Session["FCKeditor:UserFilesPath"] = Page.ResolveUrl("~/CMSFiles");

 

    }




Paragraph Control
Our paragraph control let''s you drop a quick control on the page that Content Editor''s can change as needed. All you need to add is:

<cms:Paragraph ID=defaultTop runat=server ContentName=default_welcome />

How does the system know if a user can edit?
In the SiteUtilty class, we have a method called "UserCanEdit()" that checks the current user''s role. The role SubSonic is looking for is "Content Editor" - you can change this as needed.


', 'en-US', 5, '68F6BDD6-82AB-454F-8DE8-17F114E1709E', N'Using CMS', N'*', N'SubSonic''s CMS system is painfully simple to use. Here''s what you need to know to get started with it.', N'using-the-cms-bits_2.aspx', N'', '20070509 11:54:31', N'admin', '20070509 17:10:28', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(16, N'Nothing''s Perfect... ', N'SiteMapPath doesn''t correctly rewrite the Url''s generated by UrlRewriter.
Yah, we know about this. And I''ve done everything I can think of to try to get it fixed. Krikey!

Your Design is Nice Rob, But ummmm...
Yah, I know. This thing is all themed/skinned up so hopefully it will be a quick swap out for you. I''ve tried to make sure we''re all "div''d up" so that you can get your CSS freak on. If it sucks - lemme know (and forward me your template)

You should do [CMS Thing] like DotNetNuke Does! All you have to do is...
We''re not trying to be DotNetNuke, nor do we want to even suggest that we want to be like DNN. DNN is a wonderful platform to use and this site is intended to be your quick up - not a full-blown CMS system.

The site looks like crap in IE (<7)

We aren''t entertaining any CSS issues with Quirks mode. This is by design...

I have a problem...
Visit us at http://actionpack.wekeroad.com

I want to give you some love...

And we thank you for it! Thanks!', 'en-US', 5, 'FAD2714B-C47D-4D59-B01E-0A335F914068', N'Know Issues', N'*', N'There are just some things you can''t get passed. Here''s a list of the little nigglers that drive us nuts. If you know a way to fix - let us know!', N'nothings-perfect-.aspx', N'Known issues', '20070509 14:31:55', N'admin', '20070509 14:32:12', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(17, N'Modal Windows', N'You might be wondering how we pop up the CMS editor when you double click on a paragraph. It''s the SubModal window scripting engine. It''s very easy to use - here''s an example:

Modal Windows: these nice little helpers will pop up a modal DIV screen, nicely formatted, that will display the contents of another page. They are very useful for inline viewing and informational popups. You use them simply by calling the opener javascript, anywhere on the site:
showPopWin(''http://www.wekeroad.com'', 400, 400, null);

There are some things you need to make sure you do to make this work properly on your site (in other words, don''t kill these files or lines of code):

SiteMaster: you''ll notice an INCLUDE directive right at the end of the page:

<!--#INCLUDE File=js/modal/modal_divs.aspx-->

This file holds the div tags that need to be present for the modal windows to work. If you move these or delete them, the page will be messed up. You''ll want to leave them right where they are.

You''ll also notice in the code behind file of site.master, we are dynamically adding a reference to the CSS files for the modal window:

    protected void Page_Load(object sender, EventArgs e)

    {

        if (!Page.IsPostBack) {

            Head1.Controls.Add(new LiteralControl("<script type=''text/javascript'' src=''" + Page.ResolveUrl("~/js/modal/common.js") + "''></script>"));

            Head1.Controls.Add(new LiteralControl("<script type=''text/javascript'' src=''" + Page.ResolveUrl("~/js/modal/subModal.js") + "''></script>"));

            ...

 

        }

    }

 

Again, you don''t want to change this.

Finally - there is an html page in the root called "loading.htm" - this is the loading page you see when you click on the modal window (so the user knows there''s something happening). You''ll want to leave that where it is.

All the files for the modal windows are located in js/modal so you should be able to pick this up and drop it wherever''s needed.

 

 


', 'en-US', 5, '961C846E-21CA-45BC-A604-68B473B88020', N'Modal Windows', N'*', N'We like using the Modal Pop windows that are starting to ... "pop up" all over the web. We use "SubModal" - one of the first and best.', N'modal-windows_2.aspx', N'', '20070509 15:00:04', N'admin', '20070509 15:42:50', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(28, N'Using SubSonic', N'Our docs are not extensive and we''re trying to fix this every day. If you need some help with anything - have a look-see at

If you''re the visual type, we have a bunch of webcasts you can watch (with more to come!). Check these out:
SubSonic is supposed to be stupidly simple to use- we''ve really tried to get it there. Odds are if you can''t figure something out you might be overthinking it. Give it a whirl and see what happens.

If you find a bug, please pop it here:
', 'en-US', NULL, '99D5A106-511C-4262-8A4F-5CCC91FEF5E2', N'Using SubSonic', N'*', N'Need help with this here SubSonic thing? ', N'using-subsonic.aspx', N'Help', '20070509 16:24:51', N'admin', '20070509 16:30:27', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(29, N'Pre-installed Components', N'When you first run the SubSonic Starter Site, you have:
', 'en-US', 5, 'DC9C9405-CF77-40B2-A336-490733358671', N'Components', N'*', N'Learn what things come pre-installed with the SubSonic Starter Site!', N'pre-installed-components.aspx', N'', '20070510 09:42:18', N'admin', '20070510 09:42:18', N'admin', 0); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(31, N'My New Page - Check Me Out!', N'

This is my page text...

', 'en-US', 6, '43805595-5625-4ED0-8EEB-FB6A091F7A44', N'New Page', N'*', N'This is my summary, which will appear right below the title', N'my-new-page---check-me-out.aspx', N'Keywords...', '20070510 09:59:12', N'admin', '20070510 14:38:43', N'admin', 1); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(32, N'asd', N'sad', 'en-US', 5, '0818A840-AEB4-437F-94CC-F94D74F8122D', N'sad', N'*', N'asd', N'asd_2.aspx', N'', '20070510 14:51:55', N'admin', '20070510 14:54:50', N'admin', 1); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(33, N'asdasd', N'asd', 'en-US', NULL, '3E84CEAD-94BE-45FC-85D4-014566FCDBD4', N'asdasd', N'*', N'asd', N'asdasd.aspx', N'asd', '20070510 14:55:11', N'admin', '20070510 14:56:11', N'admin', 1); INSERT INTO dbo.CMS_Page(PageID, Title, Body, Locale, ParentID, PageGuid, MenuTitle, Roles, Summary, PageUrl, Keywords, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, Deleted) VALUES(34, N'asd', N'asdasdasd', 'en-US', 33, 'E03585B7-35CA-4CA8-82D2-5B8F839E5A5F', N'sad', N'*', N'sad', N'asd.aspx', N'sad', '20070510 14:55:22', N'admin', '20070510 14:56:01', N'admin', 1); SET IDENTITY_INSERT dbo.CMS_Page OFF; -- Set up constraints ALTER TABLE dbo.CMS_Content ADD CONSTRAINT PK_Content PRIMARY KEY (ContentID); ALTER TABLE dbo.CMS_Page ADD CONSTRAINT PK_CMS_Page PRIMARY KEY (PageID); -- Return database to normal state SET NOCOUNT OFF