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

Forums / Developing with Sitefinity / Customizing SiteFinity Controls

Customizing SiteFinity Controls

8 posts, 0 answered
  1. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    23 Aug 2009
    Link to this post
    I downloaded the Control Templates for Site Finity so I can make some changes based on our needs and our CSS. For example alot of the controls use H3 but our H3 is designed to be WAY too big for the controls to handle properly. The controls I want to change though are in the search results, news and expandable lists. I am not sure I saw all of those in the templates. Am I missing something or do I need to customize the ones in the SiteFinity folders?

    A video on how to get started customizing would be great if you guys have one that I cannot find on the site.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Aug 2009
    Link to this post
    Hi Armysniper,

    Have you checked the following folder  ~/Sitefinity/ControlTemplates/Search/ where SearchResult.ascx template is located. It is not embedded and it should reside in the above path by default. In the same folder you will find searchCommonLayout.css file used to style the control.

    Let us know if there is anything else that we can do for you.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    26 Aug 2009
    Link to this post
    What about controls that are embedded...where can I find the CSS that is referenced? For example the ExpandableList control...in the ASCX file provided in the External Templates Zip...where is the CSS it references? If I wanted to change the control's use of H3 to use H4...how would I do that? Where would I put the control once I have finished. Any help on this and others such as PollBox, NewsList, etc...would be great.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 Aug 2009
    Link to this post
    Hi Armysniper,

    The just as with embedded control  templates, the built in Sitefinity controls use embedded styling rules. You have noticed that the the controls load those resources with a CSS file link. For example in the News View control template you can notice the following:
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.News.Resources.ControlTemplates.Frontend.newsCommonLayout.css" FileName="" Media="screen" runat="server" /> 

    You can provide the path to your custom styles for those controls by substituting the EmbeddedFileName with FileName and provide the path to your file.

    To inspect the embedded CSS you can use RedGate's .NET Reflector. Just open the Telerik.News.dll, and you will be able to see the reflected css for the Telerik.News.Resources.ControlTemplates.Frontend.newsCommonLayout.css for example.

    Kind regards,
    Rado
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  5. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    27 Aug 2009
    Link to this post
    So I need to buy a third party tool to find out what the settings are?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Aug 2009
    Link to this post
    Hi Armysniper,

    Reflector is a free tool for developers( you can google for it). It shows a big part of the source. However if you need a sample css for any particular built in control, let us know and I will send you the css file. However, CssFileLink control is declared in the external templats( its declaration was left from 3.6 when we megrated the templates to the new architecture).

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    27 Aug 2009
    Link to this post
    Ivan basically I am looking for a tutorial on how to customize the Polls, the Expandable Lists, and the New control. Our styles dont match what our Marketing team needs (you will see a post from Lindsay regarding one of our control needs). I need to know how to customize for example the ExandableList control to change the H3 it uses to an H4 and then get it into our project and go. I need to remove some of the fields from the NEWS control because we dont use them and when we choose to NOT display them, we get HUGE spaces between each item. So I guess the long and short of it is...it would be great to have a step by step walk through of how to change just one template, get it into the project and wired up. That's it. Then I can launch my site! ;)
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Aug 2009
    Link to this post
    Hi Armysniper,

    The control is PollsBox does not have ExandableList is template. The control has PollBox.ascx and  ResultsBoxNoLegend.ascx templates that can be used.

    For working with presentation mode templates - take a look at ContentViewDesigners_and_working_with_Presentation_Modes

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
8 posts, 0 answered