configuring initial content

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
5/20/2012 10:28:44 AM
Gravatar
Total Posts 70

configuring initial content

Hi All, I am trying to configure some initial content for the site according to http://www.mojoportal.com/configuring-initial-content.aspx

Question 1: Well, my custom control been added to the page during setup correctly and I can see it at home page.

Unfortunately I can't get the Feature Settings  functionality with kind of error "Access denied, ask Administrator" etc.

Question 2: according the example:    <contentFeature
       featureGuid="some GUID"  contentTitle="some title"
       contentTemplate="InitialSiteHomeContent.config"
    location="contentpane"        sortOrder="1"        cacheTimeInSeconds="0"    />

Is it possible to place the control into right or left column of the page layout?

Mojo version: current 2.3.8.5

Best regards, Igor.

5/20/2012 10:36:43 AM
Gravatar
Total Posts 70

Re: configuring initial content

Sorry, actually the feature config installation settings are:

            <contentFeature
                featureGuid="F408ECC7-4A90-47C5-8FDB-DE02A12B3D7A"
                contentTitle="Search"
        contentInstaller="mojoPortal.Web.HtmlContentInstaller, mojoPortal.Web"
        configInfo="InitialSiteHomeContent.config"
                location="contentpane"
                sortOrder="1"
                cacheTimeInSeconds="0"
            />

Also, I removed feature been installed by ContentInstaller and added manually. Voila,- the Settings are available without problems.

----------------

Regards, Igor.

5/20/2012 11:00:00 AM
Gravatar
Total Posts 18439

Re: configuring initial content

Hi Igor,

Feature settings should be defined in your feature definition file which is used by the  /Setup/Default.aspx page to define the settings and default values of settings for your feature. This is separate from the initial content and needs to run first from the setup page so your feature is already defined/installed before content is created using your feature. Content installation only works with features that are already installed it does not install features, setup page does that based on feature definition file.

For initial content you can study the examples in the zip file download on the article Configuring Initial Content.

The location attribute determines which panel the feature instance is added to, you can specify center, right or left like these examples used for our demo site home page which has center and left content:

<page
   name="Home"
   title=""
   url="~/home"
   menuImage=""
   pageOrder="1"
   requireSSL="false"
   visibleToRoles="All Users;"
   editRoles="Content Publishers;"
   createChildPageRoles="Content Publishers;"
   pageMetaKeyWords=""
   pageMetaDescription=""
   >
   <contentFeature
    featureGuid="881e4e00-93e4-444c-b7b0-6672fb55de10"
    contentTitle="Welcome"
    location="center"
    sortOrder="1"
    cacheTimeInSeconds="0"
    contentInstaller="mojoPortal.Web.HtmlContentInstaller, mojoPortal.Web"
    configInfo="~/Setup/initialcontent/democontent/demosite-homepage-content.config"
   />
  
   <contentFeature
    featureGuid="881e4e00-93e4-444c-b7b0-6672fb55de10"
    contentTitle="more"
    contentTemplate="demosite-homepage-content.config"
    location="right"
    sortOrder="1"
    cacheTimeInSeconds="0"
    contentInstaller="mojoPortal.Web.HtmlContentInstaller, mojoPortal.Web"
    configInfo="~/Setup/initialcontent/democontent/more-html.config"
   />
     
  </page>

You have to create your own content installer for your custom feature, based on what you posted you are trying to use the content installer for the HtmlContent feature but with your own feature guid, that is not going to work. If you don't implement a content installer of your own you can leave "contentInstaller" attribute blank and it will put your feature on the page, but if you need to populate content inside your custom feature you must implement your own content installer. You can study existing content installers for different features to learn how to implement your own, then specify the type for your content installer in the contentInstaller attribute.

Hope that helps,

Joe

5/20/2012 3:51:25 PM
Gravatar
Total Posts 70

Re: configuring initial content

Joe, thanx a LOT!

The problem was in "If you don't implement a content installer of your own you can leave "contentInstaller" attribute blank"

Actually I was interested in structure ( required pages and required controls ) not in content initialization.

Everything works now like a charm.

Regards, Igor.

 

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