1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Widget Templates Not restoring

Widget Templates Not restoring

12 posts, 0 answered
  1. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    12 Oct 2011
    Link to this post
    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
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    17 Oct 2011
    Link to this post
    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
  3. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    17 Oct 2011
    Link to this post
    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
  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    18 Oct 2011
    Link to this post
    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
  5. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    19 Oct 2011
    Link to this post
    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 .

  6. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    24 Oct 2011
    Link to this post
    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
  7. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    26 Oct 2011
    Link to this post
    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 :-)

  8. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    26 Oct 2011
    Link to this post
    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
  9. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    31 Oct 2011
    Link to this post
    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
  10. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    17 Nov 2011
    Link to this post
    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

  11. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    22 Nov 2011
    Link to this post
    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
  12. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    06 Dec 2011
    Link to this post
    The predefined value did not work for newly created events. I managed to use a table within the template so that works.
12 posts, 0 answered