November Happy Hour will be moved to Thursday December 5th.

WebParts

Vote:
 

Could anyone give me more information about how to work with webparts in EPiServer CMS 6 R2?

There is a lot of documentation but most of it still for CMS 5, since a lot has changed since then, I can't seem to get those modules to work.

Could anyone give me some advice on how to get WebParts working ?

#53693
Sep 20, 2011 15:38
Vote:
 

What exactly are you trying to get to work? These is a couple of bugs in CMS 6 R2 which can affect webparts.

#53739
Sep 21, 2011 15:46
Vote:
 

Well I'm trying to create and display WebParts. There is a lot of "old" documentation and things have changed quite a bit between versions so I don't really now where and how to start :s

So far I've placed a WebParts section in my web.config-file, I've created a user control with the WebBrowsable and Personalizable attirbutes and I've made a custom page for displaying the webpart which contains a webpartmanager, a catalog, an editorzone and a webpartzone... this is basically all I've scrapped together from all documentation :P

The webpart is not showing though :(

 

Any help would be appreciated!

#53810
Sep 23, 2011 8:26
Vote:
 

Update:

Using the tutorial below I managed to get the concept of WebParts working, but I have to add the webparts in code. I would like to make it possible to add them like you normally add other properties, but I'm kind of stuck :s

http://msdn.microsoft.com/en-us/library/784d8z92.aspx

#53861
Sep 23, 2011 10:24
Vote:
 

And how do I get a closed webpart back :P

#53862
Sep 23, 2011 10:37
Vote:
 

EPiNova, a well established EPiServer partner in Norway, have developed a framework for working with webparts in EPiServer. Check out this page from them: http://www.epinova.no/blog/thomas-leela/dates/2009/10/web-parts-and-episerver-in-perfect-harmony/

#53866
Sep 23, 2011 11:38
Vote:
 

I already found that, but since the article is dated 2009, I wonder if this will work for CMS 6 R2?

#53867
Sep 23, 2011 11:48
Vote:
 

I have asked EPiNova if it will work on CMS 6 R2

#53869
Sep 23, 2011 13:01
Vote:
 

Did they anwer yet?

#53870
Sep 23, 2011 13:11
Vote:
 

When I try to install EPiNova I just get a LocalSQLServer connectionStringName error, like this one: http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=47255.

Unfortanetly their solution doesn't work here :s

#53871
Sep 23, 2011 13:33
Vote:
 

To get the EPiNova webparts working on CMS 6 R2 you need to apply a hotfix. Contact our support department and ask for hotfix #73106.

You can request a hotfix by registering a support incident using the link below:

http://world.episerver.com/util/login.aspx?ReturnUrl=%2fSupport%2fRegister-Support-Incident%2f

#53897
Sep 26, 2011 10:08
Vote:
 

Hi,

Epinova have registered a bug for EPiServer CMS 6 R2 which can cause some trouble for certain types of webparts. The webparts affected by this bug will be all webparts inheriting from PropertyLinkCollection and PropertyXhtmlString.

You can find more information on the bug here:
http://world.episerver.com/Support/Bug-List/#bug,EPiServer%20CMS,70463,zS%2fv5XG%2bEyHH40MkbUXEcOpvNl0%3d

We have not yet received a working bugfix for this, but I can let you know when we do.

However, the problems you describe above are not connected to this bug. Can you please update me on your progress and I can try to help you out?

Karoline

#53945
Sep 27, 2011 7:58
Vote:
 

I'm currently trying to get the hotfix going, I will keep you updated.

#53946
Sep 27, 2011 8:05
Vote:
 
I'm stuck... again...



I've done the following things, but nothing happens...

- Added the new EPiServer.dll (the one that I was sent as a hotfix) plus the EPiNova.WebParts.Provider

- Added the following to the web.config:

<personalization defaultProvider="EpinovaPageVersionedProvider">
    <providers>
	<clear/> <!-- you might get the "The specified connectionStringName, 'LocalSqlServer', was not registered."-error if you don't set this -->
      <add name="EPiServerPersonalizationProvider" type="EPiServer.WebParts.Core.EPiServerPersonalizationProvider" connectionStringName="EPiServerDB" />
      <add name="EpinovaPageVersionedProvider" type="Epinova.WebParts.Providers.PageDataPersonalizationProvider" connectionStringName="EPiServerDB" fallbackProviderName="EPiServerPersonalizationProvider" />
    </providers>
</personalizaton>
    

- Created and registered a simple webpart (based on a user control)
- Added the properties "WebParts Personalization" and "WebPart" to my page

In the edit mode of my page, I can see both properties... The personalization is a blank field (no clue what to do with this), the webpart is a dropdownlist that shows the registered webpart.

What am I missing/forgetting/doing wrong??

All help would be appreciated!
#53951
Edited, Sep 27, 2011 10:10
Vote:
 

Additional info:

I've got a scriptmanager and webpartmanager in my masterpage and in my page I've got EPiServer properties with as propertyname, the name of the webpart personalization and webpart property.

All I'm getting so far is the name of the webpart being printed :s

#53953
Sep 27, 2011 10:26
Vote:
 

Hi,

Have you added a webpart zone to your page? And do you get the "Edit WebParts" option in your right-click menu when you're logged in as a user with webpart privilages?

I see that most blog posts on this subject are really outdated, I'll try to create a new step-by-step blogpost later on this week (unfortunately I don't have time today).

Karoline

#53954
Sep 27, 2011 10:35
Vote:
 

A step-by-step blogpost would be nice, because indeed all documentation is outdated or incomplete :s

when I add a webpart zone (which I forgot) I get an error saying the WebpartZone does not have a public property named Property, meaning it won't accept <EPiServer:Property> tags :s So how am I supposed to pass the property along?

 

#53955
Sep 27, 2011 10:41
Vote:
 

I wouldn't define this as progress but at least it is something :P

This is the code in the page that should contain the webparts:

 

<asp:WebPartZone ID="WebPartZone1" runat="server">
        <ZoneTemplate>
        <EPiServer:Property ID="Property3" PropertyName="AddWebPart" runat="server" />
        <EPiServer:Property ID="Property4" PropertyName="NewWebPart" runat="server" />
        </ZoneTemplate>
    </asp:WebPartZone>

    

The first property represents the WebPartPersonalization property (didn't do anything with it, since I have no clue how this works), the second property represents the WebPart property.

The result is a page with two webpartchromes on it, the first chrome is empty, the second one only has the name of the webpart. 

I checked the context menu: this now has "versions" in it, but no "Edit WebParts"...

I think I shoudl be using custom EPiNova properties or somehting like that? :s

 

 

#53956
Sep 27, 2011 10:48
Vote:
 

Hi,

The problem is that you're mixing .NET webparts and EPiServer webparts. The EPiServer webpart framework is built on top of the .NEt webpart framework, and is therefore compatible with EPiServer.

This is how you declare a webpart zone using the EPiServer webpart framework:

    <epicode:zonelowuiimpact runat="server" ID="pageBottomZone" catalogzoneid="ThemeCatalogZone"
        layoutorientation="Horizontal">
               </epicode:zonelowuiimpact>

    

When you add this zone to your page you will get an "Edit webpart" option in your right-click menu. Here you can choose a webpart from a dropdown menu and add it to the zone.

Keep in mind that the webpart properties that are added to your pages automatically should never be edited or be visible to the editor, they should only "work behind the scenes" in order for the framework to work as expected :)

Hope this helps you a bit!

Karoline

#53957
Edited, Sep 27, 2011 11:07
Vote:
 

Well now I'm totally confused :P

I can't use .NET webparts with EPiServer webparts but I need to combine EPiNova and EPiCode? :s

 

#53958
Sep 27, 2011 11:38
Vote:
 

Could you explain how to install EPiCode? Am I supposed to just add the dll or?

#53972
Sep 27, 2011 13:13
Vote:
 

Okay so here's an update:

I added the webpartzone like you said and looked used EPiCode components for the manager. Now I get the context menu for editing webparts and when I click this I can see the webpart zone. The only thing missing is the catalog with the webparts to choose from. It's not showing at all right now. I did get an Ajax client-side error so I'm trying to get that resolved hoping that might be what's messing up the catalog.

#53983
Sep 28, 2011 8:01
Vote:
 

Another update (I'm talking to myself :p):

I found this article which help me so much!

http://www.epinova.no/blog/arild-henrichsen/dates/2010/10/manual-implementation-of-epinova-flexigrid-in-visual-studio/#webpartfolder

I've now got webpartzones, the catalog, it seems fine... except for one thing :( I've got no drag and drop functionality... so I can't place the webparts in their zones.

Anybody got ideas?

#53986
Sep 28, 2011 10:28
Vote:
 

Okay, here is another update, but luckily the last since the problem is fixed!

I've got webpartzones, flexigrids, catalogs... the whole thing! I got the AJAX problem solved thanks to this article (http://labs.episerver.com/en/Blogs/Ted-Nyberg/Dates/112276/12/EPiServer-CMS-5-R2-gives-Sys-is-undefined-on-IIS7/), which was the cause for the non-working Flexigrid!

#54024
Sep 29, 2011 11:40
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.