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

Forums / General Discussions / Are control templates available?

Are control templates available?

8 posts, 0 answered
  1. David Arnold
    David Arnold avatar
    13 posts
    Registered:
    31 Jul 2009
    14 Feb 2011
    Link to this post
    I seem to remember finding a download somewhere with the source files for all of the built in controls for a 3.x version of sitefinity, does a similar download exist somewhere for the sitefinity 4.0 controls?

    The built in navigation control does exactly what I need when set to "Custom Navigation" with the "All pages under particular page" option selected except there seems to be no selected css class being applied to selected pages. I need this feature so I can properly hide/show my sub menus via css.

    It seems it would be easier for me to just modify the existing navigation control to include this rather creating a new custom control from scratch.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    15 Feb 2011
    Link to this post
    Hello David,

    Some of the templates in Sitefinity 4.0 are exposed for editing through the UI - Design >> Widget Templates, but if we are talking about Navigation control - its template cannot be edited from this section.
    The Navigation control is a complex control that wraps several controls inside it. Actually you can easily modify the control behavior by creating a template that has BaseDataBound control inside it. Then you can subscribe for ItemDataBound event of the control declared in your custom template and get/set css to the items you want.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Majid
    Majid avatar
    17 posts
    Registered:
    02 Jun 2011
    06 Jul 2011
    Link to this post
    Hey there,
    how can I edit Subscribe Widget template?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Jul 2011
    Link to this post
    Hello Majid,

    Do you refer to SubscribeForm widget for Newsletters? If so the SubscribeForm widget has a property which is used for setting the template. Below is the default template used by this control

    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="sitefinity" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
     
     
    <fieldset id="formFieldset" runat="server" class="sfnewsletterForm sfSubscribe">
        <sitefinity:SitefinityLabel id="widgetTitle" runat="server" WrapperTagName="h2" HideIfNoText="true" CssClass="sfnewsletterTitle" />
        <sitefinity:SitefinityLabel id="widgetDescription" runat="server" WrapperTagName="p" HideIfNoText="true" CssClass="sfnewsletterDescription" />
        <sitefinity:Message ID="messageControl" runat="server" FadeDuration="3000" />
        <ol class="sfnewsletterFieldsList">
            <li class="sfnewsletterField">
                <asp:Label ID="emailAddressLabel" runat="server" Text='<%$Resources:NewslettersResources, EmailAddress %>' AssociatedControlID="emailAddress" CssClass="sfTxtLbl" />
                <asp:TextBox ID="emailAddress" runat="server" CssClass="sfTxt" />
                <asp:RequiredFieldValidator ID="emailValidator" runat="server" ControlToValidate="emailAddress" ValidationGroup="subscribeForm" CssClass="sfErrorWrp" Display="Dynamic">
                    <strong class="sfError"><asp:Literal runat="server" ID="lEmailIsRequired" Text='<%$Resources:NewslettersResources, EmailIsRequired %>' /></strong>
                </asp:RequiredFieldValidator>
            </li>
            <li class="sfnewsletterField">
                <asp:Label ID="firstNameLabel" runat="server" Text='<%$Resources:NewslettersResources, FirstNamePublicForm %>' AssociatedControlID="firstName" CssClass="sfTxtLbl" />
                <asp:TextBox ID="firstName" runat="server" CssClass="sfTxt" />
            </li>
            <li class="sfnewsletterField">
                <asp:Label ID="lastNameLabel" runat="server" Text='<%$Resources:NewslettersResources, LastNamePublicForm %>' AssociatedControlID="lastName" CssClass="sfTxtLbl" />
                <asp:TextBox ID="lastName" runat="server" CssClass="sfTxt" />
            </li>
        </ol>
        <div class="sfnewsletterSubmitBtnWrp">
            <asp:Button ID="subscribeButton" runat="server" Text='<%$Resources:NewslettersResources, SubscribeToList %>' ValidationGroup="subscribeForm" CssClass="sfnewsletterSubmitBtn" />
        </div>
    </fieldset>
     
    <asp:Panel ID="selectListInstructionPanel" runat="server">
        <asp:Literal ID="pleaseSelectList" runat="server" Text='<%$Resources:NewslettersResources, ClickEditAndSelectList %>' />
    </asp:Panel>


    Greetings,
    Ivan Dimitrov
    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. Majid
    Majid avatar
    17 posts
    Registered:
    02 Jun 2011
    09 Jul 2011
    Link to this post
    Thanks a lot for perfect answer!
    1. We have a page for news that it needs an archive widget that it needs to be grouped by Year, the same as attached file (archive.jpg).
    2. for our Events page, we need to use the archive widget as grouped list of events, like eventsarchive.jpg file.
    How can I handle it?! 

    appreciate your help
    Majid 
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Jul 2011
    Link to this post
    Hello Majid,

    You will need a custom control to show the items in this way. You can use RadPanelBar control where the year will be the root panel item, since all articles would act as first child item.  Please take a look at modules API that will help you to get items you need and bind them to the presentation control you are going to use.

    Greetings,
    Ivan Dimitrov
    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. Majid
    Majid avatar
    17 posts
    Registered:
    02 Jun 2011
    13 Jul 2011
    Link to this post
    In previous versions, Sitefinity had a control for showing archive like TreeView.
    I just want to know, Is it possible for current version or not?!

    appreciate  for answer
    Majid
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Jul 2011
    Link to this post
    Hi Majid,

    You can use RadTreeBinder. Please take a look at this post

    Regards,
    Ivan Dimitrov
    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
8 posts, 0 answered