how to create intra module in sitefinity 4.rc ? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

how to create intra module in sitefinity 4.rc ?

  • how to create intra module in sitefinity 4.rc ?
  • Hi,

    how to create intra module in sitefinity 4.rc ? please guide me  in details and step by step procedure . i sitefinity 4.0 ,i did not find the namespace Telerik.cms. web , where is it ?

  • Hi Björn,

    Telerik.Cms is a namespace from Sitefinity 3.x and you cannot use it in Sitefinity 4.0. You have to use a class library, because Sitefinity 4.0 is distributed as a web application which does not support App_Code folder. If you convert the application to a web site you can use App_Code folder. You can also take a look at our SDK samples where you will find a basic sample mode.
    Note that there is no difference between intrasite or pluggable modules in Sitefinity 3.x editions and the better option is always working with class library instead of adding code to App_Code folder. Furthermore you cannot use all features if you work with App_Code - for instance embedded resources.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  • How can I "convert the application to a web site"?
  • Hello Björn,

    There is a blog post about this

    Best wishes,
    Ivan Dimitrov
    the Telerik team
  • I've just completed a video / blog post on creating Intra-Site modules in Sitefinity 4. Like 3.x, this works by wrapping all the admin and front end controls into User Controls. Then you simply create an installer to register everything in Sitefinity.

    For more see this link:

    I hope this is helpful!
  • Can you maybe extend the sample from the video a bit more? How can we for example get the same look and feel for backend pages, as when using the GenericContent approach?

    When working with a custom database, we would have to create the backend (admin) pages ourselfs. What would be the best way to do this?

  • Hi Daniel,

    You can set your pages to use the default backend theme. If there are custom widgets you need to observe the css that applies over some of the default controls and set the same css classes in your widgets.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  • Hi,

    Not sure if this is useful or not but we took a slightly different approach to that of Josh in that we created a sort of intrasite module (if thats what you want to call it in 4.0) by using creating a class library and working from that, not as easy as creating the user controls directly (which we did for other widgets) but allowed us to play with the new archichture and understand a bit more. I must say that Josh approach for installing the backend pages enhances that side of things on our implementation as we manually installed them using the backend pages and dragging the controls we defined in out module onto the page and it worked, its not perfect but enabled us to achieve something that we needed.

    Anyway our process was something like this:

    - Defined out tables in the db (not linked to sf in any way)
    - Created our data context using linq-to-sql (we only needed simple context and this fit out needs)
    - Our config.cs class inherited from ContentModuleConfigBase (glued all the provider stuff together)
    - Our module.cs class inherited from ModuleBase not ContentModuleBase
    - Our Manager.cs class inherited from ManagerBase
    - Our DataProviderBase.cs inhertied from DataProviderBase
    - Our front end UI for the controls were created as ascx files (included as embedded resources)
    - The code behind for these "ascx" controls was defined in cs classes which inhertied from SimpleView ensuring they were linked to the correct "ascx" via the layoutTemplateName property e.g. if your ascx file was in a folder structure of resources > views then this could be your string for that property Module.Resources.Views.TheView.ascx
    - CSS was created and within the module and included as an embedded resource in the control and then added to the pages that required it (in our case the backend pages) not sure if this was the best approach, maybe someone at Sitefinity can comment (i have attached out stylesheet to the bottom of this post, it is nothing fancy, and lots of it was trial and error and firebugging, man i love that thing :))
    <sitefinity:ResourceLinks ID="resourcesLinks" runat="server" UseEmbeddedThemes="True">
    <sitefinity:ResourceFile AssemblyInfo="BlocksModule.PublicControls.WishlistOverview, BlocksModule" Name="BlocksModule.Resources.stylesheets.whishlists.css" Static="true"/>

    This was just our approach, we are thinking of putting this up as a blog post on our site soon (and maybe on the sitefinity site if the sitefinity guys think it is useful??), with a slightly re-engineered version so it doesnt have the same implementation as how we developed but may give someone an understanding of how to attach to LINQ and also if you dont want on (which was the case for us at the time) you do not have to tie youself in to SF, moving forwards we are looking at OA modules but for this project it simple wasnt required. The documentation on this was woeful, it simply wasnt there at the time, i know the guys at Sitefinity are working hard on this (and maybe have already released something that we havnt seen?) and Josh's post is pretty much another way of working with this so there may be alternatives out there, but this allowed us to get the project done.

    Hope that helps some people out there.


    Our Stylesheet
    .RadGrid_Sitefinity .rgHeader, .RadGrid_Sitefinity thead .rgHeader, .RadGrid_Sitefinity thead th
    border-bottom: 1px solid #EEEEEE;
    color: #777777;
    font-size: 9px;
    font-weight: normal;
    letter-spacing: 1px;
    padding: 5px 4px 10px;
    text-transform: uppercase;
    white-space: nowrap;
    background-color: transparent;
    padding-top: 27px;
    .sfListViewGrid .rgMasterTable .sfUserCell .sfItemTitle
    cursor: pointer;
    .sfListViewGrid .rgMasterTable .sfItemTitle
    font-size: 15px;
    .RadGrid_Sitefinity .rgMasterTable .sfItemTitle
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
    .sfListViewGrid .sfItemTitle
    display: block;
    .sfListViewGrid .rgMasterTable .sfUserCell .sfItemTitle, .sfListViewGrid .rgMasterTable .sfUserCell .sfLine
    margin-left: 40px;
    .RadGrid_Sitefinity span.sfLine
    padding-bottom: 2px;
    .RadGrid_Sitefinity .sfLine
    display: block;
    padding-bottom: 5px;
    .RadGrid_Sitefinity tbody td span
    cursor: default;
    .RadGrid_Sitefinity tbody .rgRow td, .RadGrid_Sitefinity tbody .rgAltRow td
    font-size: 11px;
    line-height: 1.1;
    padding: 7px 4px 4px;
    vertical-align: top;
    .RadGrid_Sitefinity .rgRow td, .RadGrid_Sitefinity .rgAltRow td
    border-color: #EEEEEE;
    .RadGrid_Sitefinity .rgRow td, .RadGrid_Sitefinity .rgAltRow td, .RadGrid_Sitefinity .rgEditRow td, .RadGrid_Sitefinity .rgFooter td
    border-style: solid;
    border-width: 0 0 1px;
    .RadGrid_Sitefinity tbody .rgRow .sfDeleteCol
    padding-top: 4px;
    width: 15px;
    .RadGrid_Sitefinity .rgActiveRow, .RadGrid_Sitefinity .rgHoveredRow
    background: none repeat scroll 0 0 #ECECEC;
    .sfFormmargin-bottom: 15px;
    .wlDetails li spandisplay: inline-block; font-weight: bold; width: 120px;