Archive for February, 2012

Creating Page Layout Preview Images

Posted February 21, 2012 By Kevin Bennett

Images are located in en-us/PreviewImages from the Master Page Library. Edit a current PNG image in the en-us/en-us/Preview Images Directory (I edited BlankWebPartPage to get a starting one). Upload to this directory, check-in and approve

On your parent site go to Site Actions –> Site Settings –> Master Pages and page Layouts under Galleries

You can associate a custom Template with an image by adding the address of the png image to the Preview Image Fields in the Edit Page Properties.
http:///_catalogs/masterpage/en-US/Preview%20Images/.png

/_catalogs/masterpage/en-US/Preview Images/.png

Make sure you change the http to https if you are on a secure site (or you will get the unsecure pop-up which is very annoying)

 

Be the first to comment

Hiding Title in an Announcement Webpart

Posted February 8, 2012 By Kevin Bennett

A bit of a cleanup on the page, but did have a request to remove the Title at the top of the Announcement Webpart. This is how I did that.

Created the Script in my Site Assets –> Scripts, Called HideTitle.js

Entered following text in it

[code]

<script type=”text/javascript”>

document.write(‘<style>TR.ms-viewheadertr { DISPLAY: none }</style>’);

</script>

[/code]

 

Added a content Editor Webpart which called above script by name

Be the first to comment

Calling out Custom CSS on a page

Posted February 1, 2012 By Kevin Bennett

In Customizing Sharepoint I needed to call some custom CSS. In this case I needed to put a banner across the top and a custom logo.

The easiest way I found to do this is to create some CSS for the banner which would be

[code]

.s4-title {
    background: url(‘Style Library/Custom Images/New_bgrnd.png’) no-repeat scroll right top;
    margin: 0;
    }

[/code]

 

But aside from adding this to a new Content Editor Webpart (which I did for testing) on each page I wanted to call it from a custom CSS file. To accomplish this I added the following to a copy of v4.master (because we are that lame and still use v4 out of the box). I put this in the Header Section of New_v4.master

[code]

<SharePoint:CssRegistration name=”/Style Library/Custom CSS/New_Custom.css” After=”corev4.css” runat=”server”/>

[/code]

Of course I had to create the new Folder under style library called Custom CSS (this is also what I did with the images by creating a custom images folder).

Save, checkin and publish all.

Next change your Master page to New_v4.Master in Site Settings –> Master Page to the New_v4.master

Be the first to comment