Widget Templates Not restoring

Posted by Community Admin on 04-Aug-2018 14:08

Widget Templates Not restoring

All Replies

Posted by Community Admin on 12-Oct-2011 00:00

When I click restore to default for default widget templates, It erases all the code in the template, but does not replace it with the default, so the template is blank. I am using 4.2

Do you have the sample default templates stored somewhere?

I need the the Masterhyperlink code for events.

Thanks

Posted by Community Admin on 17-Oct-2011 00:00

Hi Nana,

That's a really strange behavior, the default templates should be located in the Telerik.Sitefintiy.Resources.dll assembly from your bin folder and should be restored from there. Can you please check if the assembly is in the bin folder of your Sitefinity project? Please find attached an archive of the default templates used for the EventsView widget. If you need some additional information, please let us know.

Best wishes,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Oct-2011 00:00

Yes the dll is there.

Is there a way to change what the text for this says

 

<sf:MasterViewHyperLink class="sfeventBack" Text="<%$ Resources:EventsResources, AllEvents %>" runat="server" />

 

 

?

    It says All events but because I have categorized my  events, I need it to say All Panel Attorney events or all whatever category events?

Is this possible within a widget template?

Thanks

Posted by Community Admin on 18-Oct-2011 00:00

Hello Nana,

It's possible to configure such functionality using an external template and setting the hyperlink text to the category title. However, please have in mind you can always take only the first category assigned to this event (i.e. if there are multiple categories assigned to the event, it wouldn't make sense to show all their titles in the link text, right?). I'm attaching a sample template and short video which demonstrates how I've configured it on a local project, if there's anything else you'd like to know, please do not hesitate to ask back. I believe you might find the below links useful:

Customizing Sitefinity 4 Controls with the ViewMap
Mapping External Templates for Sitefinity 4 Widgets


Greetings,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
[View:/cfs-file/__key/communityserver-discussions-components-files/297/307493_5F00_All_2D00_events_2D00_text_2D00_by_2D00_category.rar:320:240]
[View:/cfs-file/__key/communityserver-discussions-components-files/297/307494_5F00_DetailsViewCustom.rar:320:240]

Posted by Community Admin on 19-Oct-2011 00:00

Hi Boyen,
I have followed directions as I see on video and and the links you sent,  but I get error parsing template. I use the template examples you sent .

Posted by Community Admin on 24-Oct-2011 00:00

Hello Nana,

Thank you for getting back to me. Can you please provide us with some detailed screenshots/short video describing how you have set up the template on your side, and how the exception reproduces. Please make sure that you have placed the template in the correct folder according to the namespace (if you are directly extracting the sample I've provided to your project, it should be located in the root of your SitefinityWebApp project). Looking forwards to your reply.

All the best,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 26-Oct-2011 00:00

Hi Boyan,
Thanks for the response. I had the templates in the correct folder.

I did a little more research on your website and another posts mentioned that this code in green always results in error passing template

 

 

<sitefinity:TextField ID="TextField1" runat="server" DisplayMode="Read" Value='<%# Eval("ContactEmail")%>' />

 


so I changed it to

<asp:Literal ID="TextField1" Text='<%# Eval("ContactEmail") %>' runat="server" />

 



and it worked.

Thanks
I hope thats it :-)

Posted by Community Admin on 26-Oct-2011 00:00

One other question though,
I would like to move the MasterViewHyperlink to the bottom of the page.

When I move the layout template code to the bottom of the page before the RadlistView close tag, it still shows up at the top.
When i move the div tag for the hyperlink outside of the radlistview tag, it gives me an error,

When I move it inside the item template, it also gives me an error.

Thanks
Nana

Posted by Community Admin on 31-Oct-2011 00:00

Hello Nana,

You need to have the control in your LayoutTemplate, just move it below the ItemContainer placeholder control in the HTML, for example:

<LayoutTemplate>
        <div class="sfeventDetails">
             <asp:PlaceHolder ID="ItemContainer" runat="server" />
<div class="sfeventLinksWrp">
                <sf:MasterViewHyperLink class="sfeventBack" Text="<%$ Resources:EventsResources, AllEvents %>" runat="server" />
            </div>
        </div>
    </LayoutTemplate>

All the best,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Nov-2011 00:00

Hello,
Another question for you.
When you create a new custom field for a widget template and you put it a predefined value, when the field is empty, shouldnt it display the predefined value?

I would like to show the label for a field for example

Web Address : WWW.FD.ORG

on the website (not on backend)

I tried to use predefined value to store the string "Web Address" but the field shows empty on the website

How else do I display the field label?
What property do I use and how do I use it because I came accross TitleLabel property for sitefinitytextfield but I dont now what values to use or how to use it.

Thanks
Nana

Posted by Community Admin on 22-Nov-2011 00:00

Hi Nana,

Actually the default behavior that we have implemented is that when you create a new custom field and set its predefined value, this value will be applied to newly created items only. To avoid any conflicts or unexpected behavior, the field will remain empty for the already created items, allowing you to enter new value in it. Please try creating a new item and verify whether the predefined value will be persisted accordingly, and if any problems persist, let us know.


Best wishes,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 06-Dec-2011 00:00

The predefined value did not work for newly created events. I managed to use a table within the template so that works.

This thread is closed