Friday, January 13, 2012

Sharepoint Picture library Thumbnail view problem with out writing any code

if you have thumbnail view problem in the picture library allitems.aspx page ..just make sure that below contentplaceholder is avilable in the master page. Thumbnail view will not work if it is commented out in the master page


       <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server"/>


some times picture library thumbnail view wont work properly (for ex when you add it to site pages or any other pages). here is the small fix for this.

1) add content editor webpart to your page and select Content editor webpart the one you added and go to EditHtmlsource >  copy and paste below code.
2)that's it.. now you are good to go....

<TABLE style="padding-top: 8px" cellSpacing=0 cellPadding=0 border=0 width=100%>
<TR valign=top><TD>&nbsp;</TD></TR>
</TABLE>
<TABLE id=ImgPreviewTable cellSpacing=2 cellPadding=0 border=0 width=100% style="display:none">
<TR><TD vAlign=center >
<SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:wss,piclib_picturePreview%>" EncodeMethod='HtmlEncode'/></TD></TR>
<TR><TD class="ms-navline" width=128><IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></TD></TR>
<TR>
<TD vAlign=center align=center style="padding-top:3px" onClick="ClickPreview(); return false;">
<a name="lnkPreviewImg" id="lnkPreviewImg" href="Javascript:">
<img SRC="/_layouts/images/preview.jpg" NAME=ImgPreviewThumbnail ID=ImgPreviewThumbnail class=thumbnail height=90 width=120 alt="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,piclib_picturePreview%>' EncodeMethod='HtmlEncode' __designer:Preview="Picture Preview"/>"></a><br>
<a name="lnkPreviewTitle" id="lnkPreviewTitle" href="Javascript:" class="ms-imglibPreviewTitle">"<SharePoint:EncodedLiteral ID="EncodedLiteral2" runat='server' text='<%$Resources:wss,piclib_pictureFileName%>' EncodeMethod='HtmlEncode'/>"</a>
</TD>
</TR>
</TABLE>



Adding above code to content editor webpart.


 When you have 2 picture libraries in the same page above code is not working. So please add one picture library and Asset library  then it works as shown in below picture.



Followers