<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/sharepoint</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 13:35:00 GMT</pubDate>
<item>
<title>(JavaScript) How to retrieve data from a list in Sharepoint 2013 using oData and JavaScript - rumremix</title>
<link>http://snipplr.com/view/71175/how-to-retrieve-data-from-a-list-in-sharepoint-2013-using-odata-and-javascript/</link>
<description><![CDATA[ <p>The following code fetches contents of each Title field from the list called "LandingMiddleLinks"</p> ]]></description>
<pubDate>Wed, 15 May 2013 03:29:20 GMT</pubDate>
<guid>http://snipplr.com/view/71175/how-to-retrieve-data-from-a-list-in-sharepoint-2013-using-odata-and-javascript/</guid>
</item>
<item>
<title>(Other) what to do if sharepoint designer gets out of sync with server - rumremix</title>
<link>http://snipplr.com/view/70376/what-to-do-if-sharepoint-designer-gets-out-of-sync-with-server/</link>
<description><![CDATA[ <p>check the file out in the browser
in spd, right click the file and choose "undo checkout"
repeat the last two steps until the checkmark goes away in spd
check the file out in spd. it should now get the latest version to edit</p> ]]></description>
<pubDate>Wed, 13 Mar 2013 10:17:47 GMT</pubDate>
<guid>http://snipplr.com/view/70376/what-to-do-if-sharepoint-designer-gets-out-of-sync-with-server/</guid>
</item>
<item>
<title>(C#) sharepoint 2010 event receiver code that checks in files newly added to style library - rumremix</title>
<link>http://snipplr.com/view/68942/sharepoint-2010-event-receiver-code-that-checks-in-files-newly-added-to-style-library/</link>
<description><![CDATA[ <p>Keep the namespace name, class name, guid that VS automatically generates. Make sure all of the "using" inclusions included.</p> ]]></description>
<pubDate>Tue, 04 Dec 2012 12:35:06 GMT</pubDate>
<guid>http://snipplr.com/view/68942/sharepoint-2010-event-receiver-code-that-checks-in-files-newly-added-to-style-library/</guid>
</item>
<item>
<title>(XSLT) How to create a sharepoint data form web part that uses only client side JavaScript - rumremix</title>
<link>http://snipplr.com/view/67364/how-to-create-a-sharepoint-data-form-web-part-that-uses-only-client-side-javascript/</link>
<description><![CDATA[ <p>With jQuery and SPServices, we have very powerful tools for accessing and manipulating Sharepoint data and precisiely contolling the presentation, entirely from the client side. But such solutions generally need to be either hard-coded into pages or require cumbersome content editor pastes or includes. The advantage of packaging a solution as a web part is that it is a breeze to drop it anywhere on the site. Using the technique below you can package up a purely HTML/JavaScript solution as a web part, combining the benefits of both.

1. Create the HTML/JS content that you would like to turn into a web part in the manner you are most comfortable with
2. Create a dummy page in the site to initially hold our xslt
3. Open site in Sharepoint Designer
4. Find the page created in step 2, detach it from the page layout (by right clicking it), and open it for editing.
5. Place your cursor before the closing < /ContentTemplate > or closing < /asp:Content > tag
6. Paste the code in the source block below.
7. Find 
Title="DataView 1" 
in the code you pasted and replace it with
Title="MoreUsefulWebPartName" 
8. Replace the contents between the opening and closing ![CDATA tags with the HTML and/or JavaScript you created in step 1
9. Select all of the new code, starting with and including the opening WebPartPages:DataFormWebPart tag and ending with and including the closing /WebPartPages:DataFormWebPart tag
10. Switch from code view to designer view. You may ignore any warning you see about missing data sources.
11. Click the web part tab
12. In the "Save Web part" section, select the manner in which you would like to save the new web part.
13. Give the web part a useful name
14. Once you make the new web part available in the web part gallery, users may now add your javascript solution to any page as they would any other web part.</p> ]]></description>
<pubDate>Wed, 26 Sep 2012 05:06:47 GMT</pubDate>
<guid>http://snipplr.com/view/67364/how-to-create-a-sharepoint-data-form-web-part-that-uses-only-client-side-javascript/</guid>
</item>
<item>
<title>(JavaScript) get hover effect of global nav parent link to roll off at same time dropdown goes away in out of the box sharepoint global nav - rumremix</title>
<link>http://snipplr.com/view/65637/get-hover-effect-of-global-nav-parent-link-to-roll-off-at-same-time-dropdown-goes-away-in-out-of-the-box-sharepoint-global-nav/</link>
<description><![CDATA[ <p>The class, "activeDDParent", needs css that will cause the parent to have the same hover effect it has when the mouse hovers over it. This class allows for the out-of-the-box sharepoint rollof delay. "portalnavwrapper" is just the class of a div I have that surrounds the global navigation piece. But this can be anything that encompasses the entire navigation region.</p> ]]></description>
<pubDate>Fri, 15 Jun 2012 08:35:48 GMT</pubDate>
<guid>http://snipplr.com/view/65637/get-hover-effect-of-global-nav-parent-link-to-roll-off-at-same-time-dropdown-goes-away-in-out-of-the-box-sharepoint-global-nav/</guid>
</item>
<item>
<title>(JavaScript) get Current SPSite - Hirsel</title>
<link>http://snipplr.com/view/65069/get-current-spsite/</link>
<description><![CDATA[ <p>without trailing slash</p> ]]></description>
<pubDate>Thu, 24 May 2012 17:38:07 GMT</pubDate>
<guid>http://snipplr.com/view/65069/get-current-spsite/</guid>
</item>
<item>
<title>(ASP) Breadcrumb in Sharepoint 2010 - rumremix</title>
<link>http://snipplr.com/view/63654/breadcrumb-in-sharepoint-2010/</link>
<description><![CDATA[ <p>Both ASP and Javascript versions provided below. Use either one or the other. Code should be placed in a SharePoint 2010 master page.</p> ]]></description>
<pubDate>Thu, 01 Mar 2012 10:57:15 GMT</pubDate>
<guid>http://snipplr.com/view/63654/breadcrumb-in-sharepoint-2010/</guid>
</item>
<item>
<title>(XML) Setting up Sharepoint files as a visual studio .Net solution - rumremix</title>
<link>http://snipplr.com/view/63219/setting-up-sharepoint-files-as-a-visual-studio-net-solution/</link>
<description><![CDATA[ <p>Setting up a sp .net soln 

File --&amp;gt; New --&amp;gt; Project
on lefthand side -&amp;gt; Sharepoint -&amp;gt; 2010
usually select an empty template
name the project

to add files, create a module...
right-click project --&amp;gt; add --&amp;gt; new item
select "module"
give the module a name (such as masterpagecatalog)
this will create the module, containing an elements.xml file and open the elements.xml file in code editor. Sample.txt will also be created but may be deleted.

Drag any previously created files that will live in the new module into the module icon in solution explorer

Edit elements.xml.  (See example edits to elements.xml in code block further down.) 


Edits to make to default xml:

in &amp;lt;Module&amp;gt; tag, put a url (such as  Url="_catalogs/masterpage" ) and put  RootWebOnly="TRUE"

The &amp;lt;file&amp;gt; tag will also be created with a default url property. Make sure to edit this so that it is correct. By default, it will create a path starting with the name of the module. And if there is no such folder already with that name beneath the Module path, the feature will create one.  The actual path is designated by both the &amp;lt;module&amp;gt; url property and the &amp;lt;file&amp;gt; url property (that is, both of those properties are combined).

Add Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" to the &amp;lt;file&amp;gt; elements. IgnoreIfAlreadyExists="TRUE" means "overwrite existing file". Type="GhostableInLibrary" setting is used when a file is placed into a library. If a file is placed outside of a library, Type="Ghostable" would be used.

Change the &amp;lt;file&amp;gt; tags so that it is not self-closing.

Add some Property tags.Columns in the master page correspond to file object properties indicated in the module xml. Other file properties in the xml will also be added to the "property bag" that do not correspond to master page columns (see &amp;lt;property&amp;gt; tags above). 

First, it is good practice to always add
&amp;lt;Property Name="FeatureId" Value="$SharePoint.Feature.Id$" Type="string"/&amp;gt;

On compliation, Value="$SharePoint.Feature.Id$" will be replaced with guid of feature. 

For a master page, the following metadata will be added via the property tags

&amp;lt;Property Name="UIVersion" Value="4" /&amp;gt;  
&amp;lt;Property Name="ContentTypeId" Value="0x010105" /&amp;gt;
&amp;lt;Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" /&amp;gt;
&amp;lt;Property Name="MasterPageDescription" Value="Masterpage for SepulvedaPOC sites." /&amp;gt; 


Make sure to edit the description as appropriate.

When the module was created, VS automatically created a feature called "Feature 1". Note that features may also be created by right-clicking "Features" in soln explorer and selecting "Add Feature".

Next step: add event reciever feature activated code if necessary

* Make sure to add the proper modules to the feature
* Make sure that Scope is set to "Site" in the feature if the solution is a sandbox solution</p> ]]></description>
<pubDate>Fri, 10 Feb 2012 04:50:30 GMT</pubDate>
<guid>http://snipplr.com/view/63219/setting-up-sharepoint-files-as-a-visual-studio-net-solution/</guid>
</item>
<item>
<title>(XSLT) hijack submit or save button on sharepoint list form to redirect - rumremix</title>
<link>http://snipplr.com/view/60467/hijack-submit-or-save-button-on-sharepoint-list-form-to-redirect/</link>
<description><![CDATA[ <p>Comment out the SharePoint:SaveButton tag and replace with input tag</p> ]]></description>
<pubDate>Wed, 02 Nov 2011 10:13:46 GMT</pubDate>
<guid>http://snipplr.com/view/60467/hijack-submit-or-save-button-on-sharepoint-list-form-to-redirect/</guid>
</item>
<item>
<title>(JavaScript) Better Print for SharePoint Page - nickaranz</title>
<link>http://snipplr.com/view/57660/better-print-for-sharepoint-page/</link>
<description><![CDATA[ <p>.zz1_logoLinkId_1
{
	color: #fff;
	background-image:url("/_layouts/Images/HLLMRKLINK/Logo.gif");
	background-repeat:no-repeat;
	background-position:15px 10px;
	background-color:#67507e;
	display:block;
	width: 170px;
	height: 88px;
	overflow: hidden;
	text-indent: -9999px;
}
a:Link, a:visited
{
    color:#67507e;
}
.pageTitle
{
    font-weight:bold;  
    font-size:15pt;
    margin-top:15px;  
}
#MSOMenu_WebPartMenu
{
    display:none;
}
.pageContent p
{
    margin-top:0;
    padding-top:0;
}
#ctl00_ContentMap
{
    margin-top:15px;
}</p> ]]></description>
<pubDate>Sat, 06 Aug 2011 07:44:50 GMT</pubDate>
<guid>http://snipplr.com/view/57660/better-print-for-sharepoint-page/</guid>
</item>
<item>
<title>(XSLT) JavaScript in XSLT template - nickaranz</title>
<link>http://snipplr.com/view/57548/javascript-in-xslt-template/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 03 Aug 2011 05:23:29 GMT</pubDate>
<guid>http://snipplr.com/view/57548/javascript-in-xslt-template/</guid>
</item>
<item>
<title>(ASP) SharePoint Field Validator - nickaranz</title>
<link>http://snipplr.com/view/57500/sharepoint-field-validator/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 02 Aug 2011 09:01:36 GMT</pubDate>
<guid>http://snipplr.com/view/57500/sharepoint-field-validator/</guid>
</item>
<item>
<title>(ASP) SharePoint Styling Common Controls - nickaranz</title>
<link>http://snipplr.com/view/57498/sharepoint-styling-common-controls/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 02 Aug 2011 08:07:19 GMT</pubDate>
<guid>http://snipplr.com/view/57498/sharepoint-styling-common-controls/</guid>
</item>
<item>
<title>(JavaScript) SharePoint Quick Modal Dialog - nickaranz</title>
<link>http://snipplr.com/view/57497/sharepoint-quick-modal-dialog/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 02 Aug 2011 07:29:19 GMT</pubDate>
<guid>http://snipplr.com/view/57497/sharepoint-quick-modal-dialog/</guid>
</item>
<item>
<title>(SASS) Add Javascript in itemStyle.xsl - diogoweb</title>
<link>http://snipplr.com/view/56676/add-javascript-in-itemstylexsl/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 16 Jul 2011 04:27:25 GMT</pubDate>
<guid>http://snipplr.com/view/56676/add-javascript-in-itemstylexsl/</guid>
</item>
<item>
<title>(C#) SharePoint 2010 Write to ULS logger - nickaranz</title>
<link>http://snipplr.com/view/55698/sharepoint-2010-write-to-uls-logger/</link>
<description><![CDATA[ <p>Modify as neccesary, add more areas.</p> ]]></description>
<pubDate>Sat, 25 Jun 2011 07:59:33 GMT</pubDate>
<guid>http://snipplr.com/view/55698/sharepoint-2010-write-to-uls-logger/</guid>
</item>
<item>
<title>(XSLT) Customazing XsltListViewWebPart XSL with pagination - diogoweb</title>
<link>http://snipplr.com/view/55240/customazing-xsltlistviewwebpart-xsl-with-pagination/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 15 Jun 2011 03:43:35 GMT</pubDate>
<guid>http://snipplr.com/view/55240/customazing-xsltlistviewwebpart-xsl-with-pagination/</guid>
</item>
<item>
<title>(JavaScript) Getting Query String Parameters from URL - nickaranz</title>
<link>http://snipplr.com/view/54521/getting-query-string-parameters-from-url/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 28 May 2011 00:27:04 GMT</pubDate>
<guid>http://snipplr.com/view/54521/getting-query-string-parameters-from-url/</guid>
</item>
<item>
<title>(C#) Getting Query String from Event Receiver - nickaranz</title>
<link>http://snipplr.com/view/54519/getting-query-string-from-event-receiver/</link>
<description><![CDATA[ <p>only works in async. events. Ending in "ing"</p> ]]></description>
<pubDate>Sat, 28 May 2011 00:16:51 GMT</pubDate>
<guid>http://snipplr.com/view/54519/getting-query-string-from-event-receiver/</guid>
</item>
<item>
<title>(JavaScript) change the default search box text in SharePoint 2010 using JQuery - rumremix</title>
<link>http://snipplr.com/view/54473/change-the-default-search-box-text-in-sharepoint-2010-using-jquery/</link>
<description><![CDATA[ <p>Use whatever is needed to select the input box.  $('#searchBoxOuter td.ms-sbcell input') reflects some custom master page html I have so I used that.</p> ]]></description>
<pubDate>Fri, 27 May 2011 10:32:15 GMT</pubDate>
<guid>http://snipplr.com/view/54473/change-the-default-search-box-text-in-sharepoint-2010-using-jquery/</guid>
</item>
</channel>
</rss>