I committed some stuff to svn today that will make it easier going forward to have consistent data initialisation accross the different supported dbs. It will no longer be needed to run the script to create initial site data during installation, only the table creation script and depending on the db maybe a stored procedure script will need to be run.
maintaining the different data creation scripts for each db as new features are added will no longer be needed
I encapsulated the data creation logic up in the business layer in a new class, mojoSetup.cs.
When the application starts it will check the count of rows in the mp_Sites table and if there are 0, it will create the initial site data by calling mojoSetup.CreateInitialData.
If you use the multiple sites on one installation feature of mojoPortal, it will call mojoSetup.CreateNewSiteData whenever you create a new site to populate the new site with the standard pages.
The content for the initial data and new site data comes from new files I added in the /Data/MessageTemplates folder
For example the intial home page content comes from en-US-InitialSiteHomeContent.config
You can localize these by creating your own files with a prefix matching the culture setting you have in the Web.config Culture key and dropping your files in the same folder.
For example a German translation of the same file would be named:
If it can't find the file for the culture you have set in your Web.config file, it will fall back to using the english file.
As always any contributions of translated files is welcome and many thanks to all those who have contributed the culture files and translations already.
Sunday, February 5, 2006 2:07:02 PM