More in this section

Forums / Developing with Sitefinity / Intrasite module with generic content

Intrasite module with generic content

4 posts, 1 answered
  1. scorpionjade
    scorpionjade avatar
    10 posts
    Registered:
    03 May 2007
    23 Nov 2009
    Link to this post
    Greetings,

    Is there a documentation or a guide that is describing how to use generic content in an intrasite module?

    Thank you
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 Nov 2009
    Link to this post
    Hi scorpionjade,

    If you want to use Generic Content control you you should have a reference to Telerik.Cms.Engine. If you want to work with IContent objects your views have to inherits from the base view classes. Below are listed some of them

    ContentItemEdit
    ContentItemNew
    ContentItemList

    Let us know if you need further information.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. scorpionjade
    scorpionjade avatar
    10 posts
    Registered:
    03 May 2007
    23 Nov 2009
    Link to this post
    Thank you for your immediate aid Ivan.

    Infact, I have read almost all posts you've written on creating products module, backend version and so on. I've also watched the webinar named "Introduction to Sitefinity Intra-Site Module Creation" that you've created with Gabe.

    I concluded that intrasite module development suits more to me, I'm now trying to build one and I will use generic content feature.

    At this point, I'm stuck at defining a custom generic content with metafields on web.config so I can use it with the methods you've mentioned.

    Thank you.

    Jade
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 Nov 2009
    Link to this post
    Hello scorpionjade,

    Each Generic Content based module supports metafields. You should have declared a provider for your custom module and under metafileds section of the web.config file your metakeys. Make sure that you have setting and manager elements in your module manager class

    /// <summary>
          /// Gets a settings element for our module (generic content implementation for news) within web.config.
          /// </summary>
          public static IDictionary<string, GenericContentElement> ContentSettings
          {
              get
              {
                  return ModuleManager.contentSettings;
              }
          }
     
     
          /// <summary>
          /// Gets manager responsible for working with content.
          /// </summary>
          public ContentManager Content
          {
              get
              {
                  if (this.contentManager == null)
                      this.contentManager = new ContentManager(this.settingsElement.ProviderName);
                  return this.contentManager;
              }
          }

    If you have some specific problems with any implementation, let me know. Generally the products module shows almost the whole basic implementation of an Generic Content based module.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 1 answered