Sitefinity ASP.NET CMS - Content Management System

Support Forum Thread

Home >  Support >  Forums home > Sitefinity 3.x > Modules > Pulling Shared Content into a Module

Reply
Briankb, 3/21/2008 4:43:32 PM
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
, 3/25/2008 11:26:47 AM
PluggableDemoWithGeneric.zip
screen.JPG
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
Briankb, 3/25/2008 11:31:28 AM
thanks a ton!! I was digging into the DB manually and it is quite overwhelming. this will make it much easier.