Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Pulling Shared Content into a Module

Pulling Shared Content into a Module

  • Posted on Mar 21, 2008 (permalink)

    I would like to create a module that just pulls a piece of shared Generic Content from the datastore and display it. How can I do that?

    Reply

  • Georgi Georgi admin's avatar

    Posted on Mar 25, 2008 (permalink)

    Hello Briankb,

    Please take our apologies for the delayed response.

    I'm attaching a demo pluggable control written for you. It demonstrates how to get shared generic content and display it. You need just a few Sitefinity API functions and a standard pluggable module.
    Don't forget to add reference to the module in your Sitefinity project, and to register it in web.config file:
    <modules> 
    .. 
        <add type="Demo.CustomModule.DemoModule, Demo" /> 
    .. 
    </modules> 

    Please note that I used the GetContent() method to get all contents as List with IContent objects. GetContent has more overrides that will help you if you want to get content by specified parameters.

    I'm also attaching a screenshot of the result.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Posted on Mar 25, 2008 (permalink)

    thanks a ton!! I was digging into the DB manually and it is quite overwhelming. this will make it much easier.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Pulling Shared Content into a Module