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

Forums / Designing with Sitefinity / Using External ListPageMaster - Thumbnail now missing

Using External ListPageMaster - Thumbnail now missing

5 posts, 0 answered
  1. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    13 Aug 2010
    Link to this post
    I'm no developer but still, these controls seems very difficult to customize in terms of layout and style.

    I'm attempting to change the layout of the ListPageMaster.ascx page so that the thumbnail image shows up next to the summary text. So basically it seems I need to move the :

    <asp:PlaceHolder ID="PlaceHolder1" runat="server">
                    <p class="sf_newsThumbnail"><asp:Image ID="Image1" runat="server" /></p>
                </asp:PlaceHolder>

    lines above the:
    <p class="sf_readMore">

    lines. For starters at least.

    I've mapped the control to use the external template (which was kind of a nightmare to figure out how to do even with the guides, for a non developer like myself). So I'm now using the Sitefinity/ControlTemplates/News/ListPageMaster.ascx when using the NewsList control. Problem is, when using this template the news items thumbnail is lost.

    Looking at my pages source I see that it is still displaying most of the thumbnail's code, but lacks any src= information:

    <p class="sf_newsThumbnail"><img id="ctl00_Content_NewsView1_ctl00_ctl00_repeater_ctl01_Image1" src="" style="border-width:0px;" /></p>

    So again here is the code I assume is trying to add the thumbnail in my ListPageMaster.ascx file:

    <asp:PlaceHolder ID="PlaceHolder1" runat="server">
                    <p class="sf_newsThumbnail"><asp:Image ID="Image1" runat="server" /></p>
                </asp:PlaceHolder>

    Is there something this code is missing? Something I should add in?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Aug 2010
    Link to this post
    Hi Chris,

    The Thumbnail in this control is a  metakey value. You can set the thumbnail for each item through backend UI when you create or edit a news item. There is  a ButtonSelector and TextBox with label - Thumbnail that you can use.

    Internally NewsView control looks for this metakey and set it inside SetImteMetadata method depending on the value that has been set through ButtonSelector control described above.

    The ID of the Image control should be the same as the Name of the Thumbnail metakey. You have set the ID of the image control to Image1 and mapping to the metakey could not be done.

    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
  3. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    16 Aug 2010
    Link to this post
    Ok, thanks for the reply. I assumed that the thumbnail code I have (the code that's provided in ListPageMaster.ascx) wasn't calling for the thumbnail image. Thing is I don't know what the code is that would call for the proper thumbnail, because all the working examples of this control are hidden in .dlls . I tried searching the site and looking through the documentation and I can't find anything on this subject.

    Could you please tell me what I need to have as my ID to so that it calls for the proper thumbnail?

    thanks.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Aug 2010
    Link to this post
    Hello Chris,

    The ID of the Image control should be ID="Thumbnail", otherwise you have to bind the control to the thumbnail manually.

    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
  5. Chris
    Chris avatar
    49 posts
    Registered:
    20 Jul 2010
    16 Aug 2010
    Link to this post
    Sorry but that answer is too easy, while it works perfectly, it also makes me look silly for asking haha.

    But really, thank you, that works great!
Register for webinar
5 posts, 0 answered