Hmm never heard of the thumbnail property before. Do you mean you created a property with the name Thumbnail, and are trying to retrieve its value?
I'm trying to use this code to display what I thought was a picture but I find no info on it. It's in PageList.ascx.cs
protected string GetImage(PageData page)
{
if (ThumbnailProperty != null)
{
string _imgTag = "<img src=\"{0}\" alt=\"{1}\" />";
return string.Format(_imgTag, page[ThumbnailProperty], page.PageName);
}
return string.Empty;
}
Really, what I'd like to do is; I've got a property containg a picture-link that I'd like to list in the pagelist, next to the pagen ame and the preview text.
Ah I see, first you need to create a new property on your news page type of type URL to image and give it name of ThumbnailImage or something similar. Then in the page template (.aspx), where you're adding the PageList user control, you need to set the PageList user controls ThumbnailProperty property to the name you gave your property (ThumbnailImage).
Example:
<public:PageList PreviewTextLength="200" PageLinkProperty="MainListRoot" MaxCountProperty="MainListCount"
ShowTopRuler="true" runat="server" ThumbnailProperty="ThumbnailImage" />
Man, that's simple! My questions and your answers are about to create a little how-to on it's own.
Thanks. Again!
I'm trying to figure out how the thumbnail-property works. I need to get a picture out of my news pages that are listed and I wonder if this is the way to go. Can't find any documentation on it, though. I read somewhere that thumbnail might be disappearing in the future so would it perhaps be better to use a user defined image-link?