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

Forums / Designing with Sitefinity / Changing style for event titles

Changing style for event titles

12 posts, 0 answered
  1. Dale VanVoorst
    Dale VanVoorst avatar
    3 posts
    Registered:
    09 Sep 2009
    19 Nov 2009
    Link to this post
    I'm quite new to Sitefinity and am running version 3.7 SP1.  I'm working with the Inspiration templates and themes.  When I add an Event listing control to a side panel, the titles are a very large font, so I wanted to adjust the CSS to correct that.  I have been pulling my hair out for a few hours now trying to figure out where those controls are getting their stylesheet info from.  I thought the company.css file would be the place to go, but nothing that I add or change there seems to impact that control (although the changes do affect the rest of the page, so I know I'm in the right css file). 
    I saw something in the control template source about an embedded css file - but I don't know how to get at that and I was hoping I could just override that with my company.css file anyway.
    What am I missing?  This has been really frustrating since it seems like it should be so simple.
    The other related this is that I'm not sure which control template handles the event view.  In the online video example they show a "modes" folder which contains a number of those controls, but I don't see that in my file structure.  I'm hoping to also to remove a couple of items from that control.
    Thanks in advance for any assistance!
    Dale
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    20 Nov 2009
    Link to this post
    Hi Dale VanVoorst,

    Thank you for using our services.

    Well you have read correctly that the controls such as Event View, News View, etc. use embedded templates with embedded stylesheets. What you have to do is first to download the external templates archive from your Client.Net account and add the external templates to your website. Then you should go to the ~/Sitefinity/ControlTemplates/Events/ and edit the following files ContentViewItemView.ascx and ContentViewSingleItemView.ascx. Those files have a CSS file link control that defines the common layout for the events. Make that control point to your css file:
    <telerik:CssFileLink ID="CssFileLink1" FileName="~/pathtoyourcss" Media="screen" runat="server" />

    Then you have to map the events templates to the controls config file like this:
    <viewSettings hostType="Telerik.Events.WebControls.EventsView">
          <additionalTemplates>
            <!--Item List-->
            <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx" />
            <!--Single Item-->
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx" />
          </additionalTemplates>
        </viewSettings>

    I have attached the embedded css file. For more information on working with external templates, please read - How to map a view to an external template, in Sitefinity 3.6 or later?

    Regards,
    Radoslav Georgiev
    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.
  3. Dale VanVoorst
    Dale VanVoorst avatar
    3 posts
    Registered:
    09 Sep 2009
    17 Dec 2009
    Link to this post
    Thank you for that information. It was helpful, but I'm still not having any success.
    I've got all the external templates in place,
    my "Telerik.....ControlsConfig.xml" in the App_Data folder has the information matching what you sent,
    I've recompiled the solution
    But any change that I make to ~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx has no effect.  I've tried just adding text to it and things like that, but nothing changes on my web page. 
    I don't know what I'm missing.  I've tried changing file names to get something to "break", but I can't even break it. 
    I've spent alot of time double-checking, but I just can't figure out what I'm missing.  It acts like it's just using the embedded controls yet.
    Any clues as to what I'm doing wrong?

    Thanks again.

    Dale
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Dec 2009
    Link to this post
    Hello Dale VanVoorst,

    Try mapping the templates through EventsView control designer >> Advanced tab >> Appearance

    SingleitemTemplatePath property - here set the path to ListPageDetail.ascx template using the selector

    ItemListTemplatePath property - here set the path to ListPageMaster.ascx  template using the selector

    You may find the following post usieful - working with presentation modes.


    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.
  5. Dale VanVoorst
    Dale VanVoorst avatar
    3 posts
    Registered:
    09 Sep 2009
    17 Dec 2009
    Link to this post
    Ok - that works....but I'm still wondering how come it wasn't using those external controls when I configured it to in the ControlsConfig file?  
    Regardless, I'm able to do what I need to do, so thank you!

    Dale
  6. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    23 Feb 2010
    Link to this post

    Hi -

    Okay, after much trial and error - By following the steps above by Radoslav Georgiev and also changing the setting from MasterTemplateNAME to MasterTemplatePATH (!).... I have the list part working in that it is reading my custom template --- ContentViewItemView.ascx and linked custom css file! :)  To get this to diplay this I dragged the Events View Control onto the page.

    The problem I am having now is the details page after clicking on the event title, it links to the details page. On this page I dragged the same Events View Control on to the page but under settings I selcted Detail for Behavor Mode as stated in the previose post. However I am not seeing the changes I made in the ContentViewSingleItemView.ascx file.

    I did figure out that what it is diplaying is the template from here:

    ~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx and that this is by defualt filled in under Appearance - SingleItemTemplatePath. I changed this property value to link to this file -  ~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx - and it finally read the file. (will this file be overwritten in furture upgrades if it is mapped?)

    Was this pre-set in this file?
    Sitefinity\Admin\ControlTemplates\Events\EventsViewControlDesigner.ascx ? MasterTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageMaster.ascx"
    DetailTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx"
    Should I change the above in the file
    Sitefinity\Admin\ControlTemplates\Events\EventsViewControlDesigner.ascx to this below? Would this be right?
    MasterTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx
    DetailTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx
    *bug? If I select not to display Category or Tags from step #3 Event Details, they still display on the details page.

     

    Thank you!

     

     

     

     

     

  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Feb 2010
    Link to this post
    Hello Laura,

    This post answers all questions related to templates and mappings.

    "Try mapping the templates through EventsView control designer >> Advanced tab >> Appearance SingleitemTemplatePath property - here set the path to ListPageDetail.ascx template using the selector

    ItemListTemplatePath property - here set the path to ListPageMaster.ascx  template using the selector

    You may find the following post usieful - working with presentation modes."

    To make the long story short there are three ways to map an external template for ContentView based controls

    - ControlDesigner
    - ControlsConfig
    - Control properties


    *bug? If I select not to display Category or Tags from step #3 Event Details, they still display on the details page.

    In step #3 there are two groups of TextSettings - one group is for list mode and one is for details mode. Please make sure that you have changed the correct TextSettings.

    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.
  8. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    23 Feb 2010
    Link to this post
    I am sure this is frustrating to you all who have a good grasp on all this but for us that are reading each and every word literally because we need to understand it can be confusing especially when there may be different paths or suggestions used. When you don't know what you are doing one reads things very literally! Sometimes the paths are Sitefinity/ControlTemplates./.. and sometimes Sitefinity/Admin/ControlTemplates (small example). And to know the difference between the templates used for the back end versus templates used to display the content in the front-end web site canbe confusing to a neophite.

    But in any respect -  can you comment on the below? And hopefully this will all be clear? Thanks.

    ~/Sitefinity/Admin/ControlTemplates/Events/Design/EventsViewControlDesigner.ascx
    This is the template for the EventsViewDesigner control in the CMS - sets and controls the different (3) PresentationModes

    For the PresentationsMode of "List & Page" Presentation Mode change:
    MasterTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageMaster.ascx"
    DetailTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx"

    PresentationModeSettings control has two collections of settings: DetailSettings and MasterSettings.

    ~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx
    This control determinies what you see on the Event Settings inside the EventsViewDesigner under "In the event page, display:"

    ~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageMaster.ascx
    This control determinies what you see on the Event Settings inside the EventsViewDesigner under "For every event in the list page, display:"

    ~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx
    This is the template you would alter for the front end look and feel for the event details web site page.
    This template is referenced by the controls config file.

    ~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx
    This is the template you would alter for the front end look and feel for the web site page that has the lising of events.
    This template is referenced by the controls config file

  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Feb 2010
    Link to this post
    Hi Laura,

    The TOC ( which is migrated to the dev maual chm version) is a documentation for developers and it explains very well the structure of Sitefinity, template hierarchy and how the backend works.

    EventsViewControlDesigner.ascx - this is the control designer of the control. It collects data for the TextSettions of control's presentation mode and make the appearance of the edit mode more user friendly. The designer has presentation modes. Each presenation mode uses templates. Since the presentation modes are declared in the control designer you can map external templates for the views from the designer.
    ListPageMaster.ascx and ListPageDetail.ascx are just public templates that are used by ConentView based control. The ContentView based controls has two modes ( generally) - master mode - when all items are listed. In this case ListPageMaster template is used. The second mode is Details - only a single item is displayed and full data for it. In this case ListPageDetail.ascx template is used.

    ContentViewSingleItemView and ContentViewItemView are also templates for master and details mode. The are added for backward compatibility, because n the past ListPageMaster.ascx and ListPageDetail.ascx do not exsist and actually there were not external templates. Everythign was placed in the solution.

    Sincerely yours,
    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.
  10. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    12 Mar 2010
    Link to this post
    Actaully, I am having a problem viewing the Dev manual online - It has the TOC on the left and on the right it says "

    Navigation to the webpage was canceled" 

    http://www.sitefinity.com/documents/SitefinityDeveloperManual_Aricles_v3_7.chm

    Just a simple quick question. I have seen many different ways and I just want to know the best practice especially to avoid any changes with the 4.0 upgrade (from 3.7).

    When mapping to an external template for say News –
    There are actually three ways?
    We can map using the ControlsConfig file.
    Or by selecting the file at the SingleItemTemplatePath / ItemListTemplatePath  item through the Advanced tab of the News Control (from what I have read this ‘works’ better (?))
    Or in the NewsViewControlDesigner.ascx

    <sf:PresentationMode 
    ...
    MasterTemplateName="~/Sitefinity/Admin/ControlTemplates/Blogs/Modes/ListPageMaster.ascx"
    DetailTemplateName="~/Sitefinity/Admin/ControlTemplates/Blogs/Modes/ListPageDetail.ascx" 
    ...
    >

    And as a best practice, where should the ListPageDetails.ascx/ ListPageMaster.ascx be placed?  Or does it really matter?

    Because I have seen:

    ~/Sitefinity/ControlTemplates/News/Modes/ListPageDetails

    ~/Sitefinity/Admin/ControlTemplates/News/Modes/ListPageDetails.ascx

    ~/Sitefinity/Admin/ControlTemplates/News/ListPageDetails.ascx

    Thank you as always in advance.

  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    12 Mar 2010
    Link to this post
    Hello Laura,

    It does not matter where you will place the external templates. It is better to follow the structure of the sample ControlsConfig file, because it is easy to find where the external templates are stored.

    You have a problem with the chm because your windows security has block the view mode. You can fix this by right click on the chm and unblock the view from the General Tab.


    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.
  12. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    12 Mar 2010
    Link to this post
    Thank you for the straight answer!

    Also - I did the unblock and it didn't work but I think it just had to do with where I saved it (not really a 'local' drive) but I got it working now anyway. 

    Thanks again.
Register for webinar
12 posts, 0 answered