I have just uploaded some changes to Codeplex for the SharePoint Expressions project. The latest version has some changes that I will describe below.

HTML & URL Encoding

  In the first release, only some expressions (mostly URL) where HTML Encoded by default. This is no longer the case; all expressions are by default plain text. If you would like to apply HTML encoding on any expression, you simply specify “html” at the end:

<asp:Literal runat="server" ID="literal1"
 Text="<%$SharePoint:CurrentUserEmail,html %>"

Same rule applies for URL encoding:

<asp:Literal runat="server" ID="literal1"
 Text="<%$SharePoint:CurrentUserEmail,url %>"

Designer Support

  I am sure SharePoint Designer comes in mind with the above title, however, this works in Visual Studio 2010 only so far. And by that I mean a plain ASP.NET Site with the expression builder registered to it. I haven’t tested it with projects using the SharePoint Tools 2010 yet. SharePoint Designer does not recognise the expression at all on the design view so far and I will try and figure out a way around this. For the time being the editor will evaluate the expressions at design time and display something like “SharePoint: Current User Email”. I will do a bit more work on this to support provide a selectable list of expressions from the expression editor.

 

New Expressions

  I have also added some new expressions that retrieve the current list’s title, description, default view title and default view description. You can specify either the list title or relative/full URL to the list after the expression to indicate which list you would like to query. In addition, Site Logo URL and Description have been added.

  Most of the code uploaded needs testing, refactoring and optimisation so if you are to play around with the latest unreleased code, make sure you don’t do that in production code.

Advertisements