Need default code for profile widget templates - 8.2
I was trying out some custom fields on the user profile and then the ability to create a custom profile as well.
I discovered that new custom fields would need to be added to my "article-like" widget template for the profile. Once I tried to save some changes to that widget template, it is no longer a choice in the dropdown on the widget and no way to restore that widget template to the original and is not among those which can be edited under the design menu.
I imagine that I can restore this by creating a new one with the same "programming name" but a bit hard to do this when it does not show up and is not among the widget code items when you download resources through the SDK.
Anyone know where to get a copy of this code, short of creating a new project?
Also more of a rhetorical question... why would only certain items be available under Design -> Widget templates.
To be clear, I am working with the traditional widgets, not MVC. Even though some MVC equivalents exist for these, they are not styled, so would be more difficult to implement vs. tweaking some styles on something which already has a decent layout.
Thanks for any insights,
Scott
Hi Scott,
The UserProfileView settings need to be checked whether all the field value matches with attached settings image (UserProfileViewSettings.JPG) : Toolboxes->Toolboxes->PageControls->Sections->Users->Tools->UserProfileView.
The default 'Article-like' Template is found only if 1. This profile is in... Read mode only or Both: Read mode that can be edited is selected.
As it is mentioned that the "Article-like" template is no longer a choice/ missing from the drop-down list then it can be created by clicking on Create New Template button and write the Template Name: Article-like and insert the following code into the text area above the Template Name field:
<%@ 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"
>
<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=
"email"
runat=
"server"
DataFieldName=
"sf_Email"
DisplayMode=
"Read"
Title=
"<%$ Resources:Labels, Email %>"
CssClass=
"sfprofileEmail"
/>
</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"
/>
<asp:HyperLink runat=
"server"
ID=
"changeQuestionAndAnswer"
Text=
"<%$ Resources:Labels, ChangeQuestionAndAnswer %>"
CssClass=
"sfprofileChangePasswordLnk"
/>
</div>
</div>