Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Assigning a web part layout in code View modes: 
User avatar
Member
Member
Rich - 5/15/2013 8:04:09 AM
   
Assigning a web part layout in code
Hello,

I have included a Logon form web part within another web part I'm building and I'd like to assign one of my alternative layouts for this Logon form. My code to load this web part is :
<uc1:Logon ID="Logon" runat="server" allowpasswordretrieval="False" />

I have tried adding webpartlayout="MyLayout" to this, though the Default layout is still being used. Is there another way to set this?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 5/16/2013 1:53:48 AM
   
RE:Assigning a web part layout in code
Hello.

What web part is it in particular, please? The LogonForm.ascx in CMSWebParts/Membership/Logon folder? This web part does not have property for setting alternative form. You may need to modify its layout directly in its markup, in LogonForm.ascx file.

Best Regards,
Radek Macalik

User avatar
Member
Member
Rich - 5/16/2013 7:44:58 AM
   
RE:Assigning a web part layout in code
Hi Radek,

Yes it was is LogonForm.ascx web part. I'll look change the default layout code instead.

Thanks