Axinom Logo

How to activate Thumbnailing for Pages in Premium Template Project


Note. This article applies to Premium Template Project version 10, which will be available after 10 release.

In Premium Template Project the PremiumSamplePage class already implements the IThumbnailable interface.

The page overview is prepared for showing the thumbnails of the images. To enable the usage you have to do the following changes inside the code.

1) Open the  file PremiumSample.Extras.SamplePagesOverviewHelper

2) Inside the function GetColumnWidth find the column
//columns.Add(new Unit("10%"));
and remove the leading ‘//'

3) Inside the function GetColumnNames find the column
//columns.Add("Thumbnail");and remove the leading ‘//’

4) Inside the function GetHeaderContent find the column
return new string[] { "Seitenbezeichnung", "Vorlage", "Autor", "Datum", /*"Vorschau",*/ "Stadt", string.Empty};
and replace it with
return new string[] { "Seitenbezeichnung", "Vorlage", "Autor", "Datum", "Vorschau", "Stadt", string.Empty};

5) Inside the function GridItemDataBound find the columns
//Label thumbLabel = (Label)e.Item.FindControl("SortableLabel4");
      //thumbLabel.Controls.Add(new HtmlImage() {Src = page.BigThumbnailUrl});
and remove the leading ‘//’

6) Inside the same function find the line
Label cityLabel = (Label)e.Item.FindControl("SortableLabel4");
and replace it with
Label cityLabel = (Label)e.Item.FindControl("SortableLabel5");
and the line
Label publishLabel = (Label)e.Item.FindControl("SortableLabel5");
Label publishLabel = (Label)e.Item.FindControl("SortableLabel6");

After building the solution and executing postbuild.bat you’ll have thumbnails in Pages Overview.