initialcontent - can this be setup from a custom feature?

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.
3/15/2011 11:27:49 PM
Gravatar
Total Posts 5

initialcontent - can this be setup from a custom feature?

I found the instruction at http://www.mojoportal.com/configuring-initial-content.aspx however, when I followed the instructions and implemented this within my custom feature, and did a fresh install, it still used the defaults from mojoPortal.Web.

 

I had assumed that if another feature had set up the steps to create the initial content, it would be used.

Am I wrong in assuming this?

If you want initial content, must it always be done from within mojoPortal.Web?

Thanks,

Josh

3/15/2011 11:42:18 PM
Gravatar
Total Posts 5

Re: initialcontent - can this be setup from a custom feature?

I just noticed something else.

Perhaps I am doing something wrong.  I can create additional pages, just not a home.

So I'm either creating the home wrong, or even if I try to create a Home, it get's overwritten by the mojoPortal.Web version.

Could somebody more knowledgeable confirm this if you happen to know so that I don't chase after a false assumption, if the answer is already known?

 

Thanks again,

Josh

3/16/2011 9:04:32 AM
Gravatar
Total Posts 18439

Re: initialcontent - can this be setup from a custom feature?

It is NOT intended to be used inside custom content feature code (maybe that is not what you are saying but just to be clear).

It is used by the setup page and the the routines used for creating new sites to setup default content when the initial site is created and when additional sites are created. Feature code only runs after a site is created and after an instance of the feature is added to a page.

The initial content system can be used to create a page(s) and add your custom feature(s) to the page when a site is created, but that is all it does.

There is only one page pre-configured by default and that is the home page and it is configured because of the presence of the configuration file

/Setup/initialcontent/pages/0001homepage.config

If you don't want it to create that page you can remove that file and add your own. Or if you are copying your files up there using post build event you could give your file the same name and then it would overwrite the default homepage config file with yours so that it only creates the pages you defined.

Any number of files can be used and any number of pages can be defined in each file.

Hope it helps,

Joe

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