Skip to main content

Posts

Showing posts from January, 2011

Deploying Custome XSLT in views

Sometimes it is nice to know how to use SharePoint Designer to create SharePoint elements. One such scenario is use of xslt to change style depending on a variable in a list example; set s color on the prices that are more than an amount on a list. One thing is doing it in SharePoint designer on your local developer computer another is to translate that to a solution you can deploy. In this example I’m using SharePoint designer to set a rule that says that if a price on an order list is higher than 600 the background color to be set to Red. First I created the scenario in SharePoint Designer: First create an Orders list as a Custom list and add a Column called price, make sure to have one test item. Then open the list in SharePoint Designer. Here you can create the xslt by clicking on the All Items, then select a row in design view and select Conditional Formation. Do the formation that you need and save. In code view look for the XSL tag and make a copy of the content of the xsl tagl....

Simple SharePoint 2010 Ribbon example

As we all know SharePoint 2010 came with the new ribbon interface. I have not had much time exploring how to add elements to the ribbon, so I decided to have a go at it. I decided to use a blank site and try to add a ribbon to the main web part page. With god help from the Professional SharePoint 2010 Development book, here is how i did it. I started by creating two projects in my solution, one to deploy the images and one to deploy the ribbon feature. The reason for this is that I like to use the sandbox solutions as much as possible. As the images are going into the _layouts\images catalog and therefor needs to be a Farm solution and the ribbon with only one feature can be a sandbox solution. The way the Ribbons are organized are by a path. In my example the path is “Ribbon.WebPartPage.Edit.Controls._children” , here I'm saying that I want my ribbon to be on WebPart pages under the edits controls, _children means that I want it as new child not override an existing one. I found t...