Profile Widget External Template
How do I assign an external widget template to the Profile widget? From what I can see, I can edit a template or create a new one, but the Advanced tab shows nothing, so I don't see where I would assign my external template.
Hello,
I have logged this bug and we are currently working on fixing it. I hope we will be able to provide a solution for the next releases.
To solve your problem I will give you a sample template:
<%@ Control Language="C#" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %><div class="sfprofileArticleLikeWrp"> <asp:PlaceHolder ID="itemContainer" runat="server"> <sf:ImageField ID="predefinedImageField" runat="server" DataFieldType="Telerik.Sitefinity.Model.ContentLinks.ContentLink" DisplayMode="Read" ShowDeleteImageButton="false" CssClass="sfprofileField sfprofileAvatar" DefaultSrc="~/SFRes/images/Telerik.Sitefinity.Resources/Images.DefaultPhoto.png" DataFieldName="Avatar" /> <div class="sfprofileName sfprofileField"> TEST <sf:TextField ID="firstName" runat="server" DataFieldName="FirstName" DisplayMode="Read" Title="<%$ Resources:Labels, FirstName %>" CssClass="sfprofileFirstName" /> <sf:TextField ID="lastName" runat="server" DataFieldName="LastName" DisplayMode="Read" Title="<%$ Resources:Labels, LastName %>" CssClass="sfprofileLastName" /> </div> <sf:TextField ID="about" runat="server" DataFieldName="About" DisplayMode="Read" Title="<%$ Resources:Labels, About %>" CssClass="sfprofileField sfprofileAbout" /> </asp:PlaceHolder> <div class="sfprofileLnkWrp"> <asp:HyperLink runat="server" ID="editProfile" Text="<%$ Resources:UserProfilesResources, EditProfile %>" CssClass="sfprofileEditLnk" /> <asp:HyperLink runat="server" ID="changePasswrod" Text="<%$ Resources:Labels, ChangePassword %>" CssClass="sfprofileChangePasswordLnk" /> </div></div>Thank you for your reply.
This seems to mean I would lose the original template, but I still need it.
We can propably work around using an external template and just create one in the back end, however, when we add field using the Template editor, no title caption is shown, as in:
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Address1")%>' /><sf:TextField ID="Address1" runat="server" DataFieldName="Address1" DisplayMode="Write" Title="<%$ Resources:Labels, Address1 %>" CssClass="sfprofileField" WrapperTag="li" />Hello,
Add your text field in the <div>:
<%@ Control Language="C#" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %><div class="sfprofileArticleLikeWrp"> <asp:PlaceHolder ID="itemContainer" runat="server"> <sf:ImageField ID="predefinedImageField" runat="server" DataFieldType="Telerik.Sitefinity.Model.ContentLinks.ContentLink" DisplayMode="Read" ShowDeleteImageButton="false" CssClass="sfprofileField sfprofileAvatar" DefaultSrc="~/SFRes/images/Telerik.Sitefinity.Resources/Images.DefaultPhoto.png" DataFieldName="Avatar" /> <div class="sfprofileName sfprofileField"> TEST me again <sf:TextField ID="firstName" runat="server" DataFieldName="FirstName" DisplayMode="Read" Title="<%$ Resources:Labels, FirstName %>" CssClass="sfprofileFirstName" /> <sf:TextField ID="lastName" runat="server" DataFieldName="LastName" DisplayMode="Read" Title="<%$ Resources:Labels, LastName %>" CssClass="sfprofileLastName" /> <sf:TextField ID="Address1" runat="server" DataFieldName="Address1" DisplayMode="Read" Title="<%$ Resources:Labels, LastName %>" CssClass="sfprofileLastName" /> </div> <sf:TextField ID="about" runat="server" DataFieldName="About" DisplayMode="Read" Title="<%$ Resources:Labels, About %>" CssClass="sfprofileField sfprofileAbout" /> </asp:PlaceHolder> <div class="sfprofileLnkWrp"> <asp:HyperLink runat="server" ID="editProfile" Text="<%$ Resources:UserProfilesResources, EditProfile %>" CssClass="sfprofileEditLnk" /> <asp:HyperLink runat="server" ID="changePasswrod" Text="<%$ Resources:Labels, ChangePassword %>" CssClass="sfprofileChangePasswordLnk" /> </div></div>The field is being added to the <div>. Here is what I have:
<%@ Control Language="C#" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %><sf:SitefinityLabel runat="server" id="successMessageLabel" Visible="false" WrapperTagName="div" HideIfNoText="false" CssClass="sfprofileSuccessMsg" /><fieldset id="formWrapper" runat="server" class="sfprofileEditFormWrp"> <sf:SitefinityLabel runat="server" id="errorLabel" Visible="false" WrapperTagName="div" HideIfNoText="false" CssClass="sfprofileFailureMsg" /> <asp:PlaceHolder ID="itemContainer" runat="server"> <ol class="sfprofileFieldsList"> <sf:TextField ID="Address1" runat="server" DataFieldName="Address1" DisplayMode="Write" Title="<%$ Resources:Labels, Address1 %>" CssClass="sfprofileField" WrapperTag="li" /> </ol> </asp:PlaceHolder> <div class="sfprofileLnkWrp"> <asp:Button runat="server" ID="saveChanges" Text="<%$ Resources:UserProfilesResources, SaveChanges %>" CssClass="sfprofileSaveLnk" /> <asp:HyperLink runat="server" ID="cancel" Text="<%$ Resources:UserProfilesResources, Cancel %>" CssClass="sfprofileCancelLnk" /> </div></fieldset>Title="<%$ Resources:Labels, Address1 %>"Title="<%$ Resources:Labels, LastName %>"Hi,
The Title should contains resources that have already been added. If you want to use:
Title="<%$ Resources:Labels, Address1 %>"Adding the label did the trick. Thank you very much.
I've already created a new profile type so that is not an issue.
What I would suggest is to create the label automatically when we add fields to a profile type. In the field setting, there is an area for Label, and I was expecting this to be used for the label automatically in the profile widget.
Hello,
Thank you for the suggestion, we will discuss it on the next team meeting!
Kind regards,
Stefani Tacheva
the Telerik team