Thursday, February 4, 2010

Show Incoming Links on a Wiki Page

I got this great script for showing incoming links on a wiki page in SharePoint from a post at http://mo.notono.us.com/. (Here is the full link to the original post http://mo.notono.us/2009/01/moss-add-incoming-links-to-wiki-page.html.)

To place it on the page, edit your wiki page and drop in a Content Editor Web Part. Then open the source editor for the web part and drop this code in. Works like a charm!

As Oskar mentions in his post, you can also add it to the master page for your wikis. There are reasons not to, of course. But it may be a great solution depending on your circumstances.

Thanks Oskar for this great tool!

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(function() {
//get the url for the incoming links page

u = $("a[id$=WikiIncomingLinks_LinkText]")[0].href;
//create a target container and load it with the incoming links
//filtered to show the links list only
l = $("<div id='incomingLinks' style='border-top: solid 1px silver'>").load(u + " .ms-formareaframe");
//append the new container to the wiki content
$(".ms-wikicontent").append(l);
});

</script>

Monday, February 1, 2010

Hide the Left Navigation Pane using a CEWP!

Is that left-navigation pane an annoyance? Hide it using a Content Editor Web part!


Place a content editor web part on your page and click the drop-down to edit it. Click Source Editor and enter the following code:

<style>.ms-navframe{ display:none; }</style>

Make your Content Editor Web Part hidden and click OK.

Your page should now have the left-navigation pane hidden!