Are control templates available?

Posted by Community Admin on 03-Aug-2018 17:15

Are control templates available?

All Replies

Posted by Community Admin on 14-Feb-2011 00:00

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.

Posted by Community Admin on 15-Feb-2011 00:00

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

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

Hey there,
how can I edit Subscribe Widget template?

Posted by Community Admin on 07-Jul-2011 00:00

Hello Majid,

Do you refer to SubscribeForm widget for Newsletters? If so the SubscribeForm widget has a property LayoutTemplatePath 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

Posted by Community Admin on 09-Jul-2011 00:00

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 

Posted by Community Admin on 11-Jul-2011 00:00

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

Posted by Community Admin on 13-Jul-2011 00:00

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

Posted by Community Admin on 13-Jul-2011 00:00

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

This thread is closed