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 ?
thanks
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
How can I "convert the application to a web site"?
Hello Björn,
There is a blog post about this
www.sitefinity.com/.../followup_converting_sitefinity_4_web_application_projects_to_web_site_projects.aspx
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 asp.net User Controls. Then you simply create an installer to register everything in Sitefinity.
For more see this link: http://bit.ly/lHcOX7
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?
Regards,
Daniel
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
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"
/>
</
sitefinity:ResourceLinks
>
.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;
div.RadGrid_Sitefinity
background-color: transparent;
.rgTopOffset
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;