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

Forums / Developing with Sitefinity / Explicitly placing content through master pages

Explicitly placing content through master pages

4 posts, 0 answered
  1. Sang
    Sang avatar
    13 posts
    Registered:
    14 May 2008
    17 Jun 2008
    Link to this post
    I have a master page that a template inherits from.  My problem is I'm trying to explicitly placed content on the template through the master page.  For example, I want to use a image that a user is going to upload.  I want to be able pull that image and place it on every page that uses that template that has the placeholder name logo.

    What is the best way to do this using the API?

    Thanks.

    Sang
  2. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    20 Jun 2008
    Link to this post
    Hello Sang,

    There is no need to use the API because the easiest way will be to place the logo in the .master file. This is how it would automatically appear in each page which is using the particular template.
    Another option is to add a Content PlaceHolder on the exact position in the master page, so that every user who has proper permissions can place the Image control with the logo image from the administration.

    Please let us know if you have any other questions.


    Best wishes,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Sang
    Sang avatar
    13 posts
    Registered:
    14 May 2008
    20 Jun 2008
    Link to this post

    Hi Nikifor,

    That will work for one web site, but what if you have more than one web site using the same master page, and you need to determine which image to pull based on the web site?

            domain1 - group page
                default.aspx
                page1.aspx
            domain2 - group page
                default.aspx
                page1.aspx

    So basically I have a header on the master page w/ a logo and I want to be able to pull the uploaded logo for that page.  So when we're in domain1 I want to be able to grab the uploaded logo for default.aspx  for domain1 and when I'm in domain2 I want to grab the uploaded logo for default.aspx. for domain 2.  All the while users can still upload a different logo anytime they want and it will still know which logo to pull.  What is the best way to implement this through Sitefinity?

    Could you also give me a high level view of how page groups work?

    Thanks,

    Sang

  4. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    23 Jun 2008
    Link to this post
    Hi Sang,

    In your case when you are running several domains with same template, you should choose the second approach. It involves putting a Content PlaceHolder on the .master page on the place you want to have the logo afterwards (top left corner, for instance). This is how you will be able to drop the corresponding image in the PlaceHolder depending on the domain where you have loaded this template.

    As for your second question, the page structure in Sitefinity contains three main nodes as follows:

    Normal page: displays its own content, editable within Sitefinity.
    Page group: redirects to its first sub-page.
    External page: a link to a page created outside Sitefinity

    The Page Group does not have its own theme or template, as it represents several Normal Pages which are placed under one node (Group Page). Its basic function is to act like a different web site branch where you can place its own navigation controls.

    Hope that this information answers your questions.

    Best wishes,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered