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

Forums / Designing with Sitefinity / Custom Styles for Blog posts

Custom Styles for Blog posts

11 posts, 0 answered
  1. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    15 Sep 2010
    Link to this post
    I'm going bonkers trying to figure out how to over write the default blog post styles. From what I can gather from the forums, it seems that blog posts are getting it's style information from style sheets embedded in dlls (why ever do this? as far as I can tell it causes nothing but frustration for designers.) So now the problem is that I don't have any idea how to tell sitefinity to look elsewhere for a stylesheet. All the documentation I've found is extremely confusing to me, as a non-developer.

    All I want to do is style tags like sf_postTitle or reposition the layout for a control. Why lock these things away from us? Please help me to figure out how to do this.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Sep 2010
    Link to this post
    Hi Chris,

    We do not lock anything and give users options to fully customize the CMS. The steps that you should follow are in this KB article - How to apply custom stylesheet to ContentView based controls

    Best wishes,
    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. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    15 Sep 2010
    Link to this post
    I've seen these articles before but I have no idea where the control template is hidden for the blog list. controltemplates/blogs contains no ascx files. A search of every folder in my sitefinity install for sf_postTitle returns no results. Is there a comprehensive list somewhere of which file controls each core modules layout and style as well as telling me where to find the files.
  4. Kevin
    Kevin avatar
    6 posts
    Registered:
    29 Dec 2009
    15 Sep 2010
    Link to this post
    In your account > Downloads > External Templates, etc.

    These files will give you the default control templates.

    (It took me a while to find these files as well)
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Sep 2010
    Link to this post
    Hello,

    BlogPosts templates are located under

    [Sitefinity_3_7_standard_ExternalTemplates]\Sitefinity\Admin\ControlTemplates\Blogs\Modes folder

    Greetings,
    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
  6. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    15 Sep 2010
    Link to this post
    I suppose since I have yet to purchase sitefinity i cannot download or get to this external templates folder. I have not made a purchase yet because I cannot advise my company to buy sitefinity with simple themeing being such a nightmare.

    Where are the external templates? going to my account > downloads only tells me i have nothing to download.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Sep 2010
    Link to this post
    Hello Chris,

    You can get the templates from your free trials ( you have a download of Sitefinity 3.7 SP3)
    Home / Web Content Management / Your Account / Free Trials / Sitefinity Standard Edition

    Changing the appearance of the control is pretty easy and there are two main options

    1. Through your theme stylesheet which event do not require to use external template

    2. Through the template using "common layout"

    There are also other options, but I believe that 1 and 2 are enough.


    Best wishes,
    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
  8. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    15 Sep 2010
    Link to this post
    Thank jebus, this is so much better now. These files should just be included from the start! thanks
  9. Jaymie
    Jaymie avatar
    27 posts
    Registered:
    30 Jan 2009
    17 Dec 2010
    Link to this post
    I have downloaded the External Templates and applied them.
    I am using SiteFinity 3.7 and I downloaded the External Templates for .NET 3.5 (I assume those are the correct ones)
    I have added a line in all the blog templates (Sitefinity/Admin/ControlTemplates/Blogs/Modes) that adds my custom CSS file. It does not apply, so I decided to add some text in these templates. That does not appear on my blog site either, which tells me that the templates are not being used.

    After reading http://www.sitefinity.com/devnet/kb/sitefinity-3-x/how-to-map-a-view-to-an-external-template-in-sitefinity-3-6-or-later.aspx I realise I have to add something to the Telerik.Sitefinity.Configuration.ControlsConfig.xml but I am unsure what to Add.
    I need to apply my custom CSS to the actual viewing pages of the blog (i.e. to the all list, the single list, etc).
    You can see my blog here: http://staging.brightdigital.it/blog.aspx

    Any help would be greatly appreciated.

    /r3plica
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Dec 2010
    Link to this post
    Hello Jaymie,

    1. Inside the archive with external templates there is a sample ControlsConfig with all mappings from where you can see the configuration that you have to use for hostType="Telerik.Blogs.WebControls.BlogPosts"

    2. Try mapping the template from the UI - drop BlogPosts on a page and go to its Advanced section. There you will find a section Appearance where you can map the template from a public properties - ItemListTemplatePath and SingleItemTemplatePath properties.

    3. Another option would be mapping the template through the control designer

    Greetings,
    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
  11. Jaymie
    Jaymie avatar
    27 posts
    Registered:
    30 Jan 2009
    17 Dec 2010
    Link to this post
    Never mind, I found it :)

    for those that have a similar problem, you need to add this to the config xml:

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
      <viewMap>
        <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts">
          <additionalTemplates>
            <!--Provides user interface for displaying a list of posts in the BlogPosts control in the blogs module.-->
            <add key="ItemListTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewItemList.ascx" />
            <!--Provides user interface for displaying a single post in the BlogPosts control in the blogs module.-->
            <add key="SingleItemTemplate" layoutTemplatePath="~/Sitefinity/ControlTemplates/Blogs/ContentViewSingleItem.ascx" />
          </additionalTemplates>
        </viewSettings>
      </viewMap>
    </controlsConfig>
Register for webinar
11 posts, 0 answered