More in this section

Forums / Developing with Sitefinity / nested master page templates

nested master page templates

8 posts, 0 answered
  1. Muhammad Shoaib
    Muhammad Shoaib avatar
    12 posts
    Registered:
    11 May 2009
    26 Oct 2009
    Link to this post
    Hi,
    I have added two templates by uploading the master pages which are nested from another master page. Hierarchy is as follow.On the top parent master page is topmaster.master then its childs are default.master and product.master.

    When i add page and use template default.master then it shows all of the content place holders of default.master template as well as its parent topmaster.master but do not show any items added it topmaster.Same is the case with product.master.

    What i am missing?

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    29 Oct 2009
    Link to this post
    Hello Muhammad Shoaib,

    Thank you for using our services.

    Please take a look at the following KB article: Does Sitefinaity support nester master pages?

    If you have more questions, please fee free to contact Telerik Support.

    All the best,
    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. Zahid Ali
    Zahid Ali avatar
    47 posts
    Registered:
    16 Nov 2009
    08 Dec 2009
    Link to this post
    Hi Radoslav,

    In the first answer, it says: So if you want to add a control to the parent that is also seen in the template created from the child master page, you would have to add the control in the markup, and not using Sitefinity administration.

    1) is there an example, I can refer to?
    2) say, if News View is added programtically, how would I be able to change setttings in the advanced eg: hide social bookmarks etc.

    thanks.

    Zahid
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Dec 2009
    Link to this post
    Hello Zahid Ali,

    Thank you for using our services.

    Lets say that you have the parent master page. And you want to add a news view control to it. First you have to add a reference to the news webcontrols namespace:

    <%@ Register Assembly="Telerik.News" Namespace="Telerik.News.WebControls" TagPrefix="sfWeb" %>

    Then you can simply declare a news view control on the markup.

    <sfWeb:NewsView ID="NewsView" runat="server" />

    However if you add controls this way you will not be able to set their properties in the template editor or page editor. You will have to set the properties through the code or markup.

    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.
  5. Zahid Ali
    Zahid Ali avatar
    47 posts
    Registered:
    16 Nov 2009
    09 Dec 2009
    Link to this post
    Hi Radoslav,

    thanks for replying - I need bit more help on this:

    How do I change properties for NewsView - do I have to use the NewsManager in the code behind?

    please advice.

    thanks.

    Zahid
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Dec 2009
    Link to this post
    Hi Zahid Ali,

    In the code behind, call the NewsView control by ID  and you will be able to access its properties.


    Sincerely yours,
    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. Zahid Ali
    Zahid Ali avatar
    47 posts
    Registered:
    16 Nov 2009
    09 Dec 2009
    Link to this post
    Hi Ivan,

    Sorry dude, but could you give me an example please or point to an example you guys have blogged about or forum feed?

    Say, if i want hide the 'author' or 'summary' from list - i'm unable to idenfity the property since there are so many and can't find much help in documentaiton either.

    please advice.

    thanks.
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Dec 2009
    Link to this post
    Hi Zahid Ali,

    For this you can define your custom templates for listing news items and listing single news items. Then just point the news view control to those templates. You can just hide the author and summary literals on the template by setting them to Visible="false". Then set the news view like this:

    <sfWeb:NewsView ID="NewsView" runat="server" ItemListTemplatePath="~/YourPathtoItemsListTemplate" SingleItemTemplatePath="~/YoutPathtoSingleItemTemplate" />

    For more information on what each property of the news view control does, please consult the NewsView Class API Reference.


    Kind 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.
Register for webinar
8 posts, 0 answered