change home html text on setup

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/31/2010 3:21:54 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

change home html text on setup

I want to change the HTML content displayed on the Home Tab during a new install.

I can do this by changing the file...

\Web\Data\MessageTemplates\en-US-InitialSiteHomeContent.config

but I don't like changing core mojoPortal Code.

I am using the info here Configuring Initial Content and it is great.  I have added 3 pages with custom features during setup and my SQL runs fine.

I would just do an update to the database  table mp_HtmlContent on the Body text field but adding the default page and html is that last process run in a new setup and my scripts all run before this.

Can I create my own default content page so the setup script will not create one on the last step of the setup?

Thanks

Rick

8/31/2010 3:40:13 PM
Gravatar
Total Posts 2239

Re: change home html text on setup

Hi Rick,

Changing the InitialSiteHomeContent.config file isn't really changing mojoPortal code. You can safely change that file and not change any functionality of mojoPortal. The file was designed for this purpose. Just remember to make a copy of the file so when you update your installation bits with a new release, you can copy it back and have new installations use the file.

HTH,
Joe D.

8/31/2010 3:47:54 PM
Gravatar
Total Posts 18439

Re: change home html text on setup

Joe D is right, changing config files is not like forking the C# code, it is a maintenance issue much like custom Web.config settings that have to be restored after upgrades but it is safe if not convenient.

But in this case an even better solution is replacing the file(s) in /Setup/initialcontent/pages with your own configuration files, you can have more than one page created on setup, you are not limited to one. You could use a post build event in a custom project to replace the 1 file in /Setup/initialcontent/pages or just manually replace it before deployment.

for more info see

http://www.mojoportal.com/configuring-initial-content.aspx

I use this on the demo site to create a set of pages instead of just a home page when I recreate the site.

Best,

Joe

8/31/2010 3:58:25 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: change home html text on setup

Thanks Joe's

That will work great!

I'll use both your advice.

Rick

You must sign in to post in the forums. This thread is closed to new posts.