Monthly Archives: June 2011

Let Shining Examples Lead the Way to Increased SharePoint Adoption

My first “pure” BrightStarr blog entry was published today.  Here’s a teaser:

There’s been a lot of conversation on the Internets of late on the topic of SharePoint adoption and especially the lack thereof. No one wants to go to all the trouble of designing a farm and security infrastructure, participating in workshops, putting together a snazzy look and feel, working out a rock solid information architecture that can withstand the vicissitudes of company re-orgs and finally, a fanfare-filled rollout just to discover three months post go-live that less than 50% of the company employees are using SharePoint and most of them are using it to replace the old network file servers ("the S:\ drive").

No silver bullet (or single blog post) is going to solve that problem. However, there are lot of things you can do to reduce the risk of an anemic SharePoint portal. One such technique is the "Shining Example Pattern."

I’d love to know about other SharePoint adoption strategies that you care to share.  If you do share, please leave as a comment on the BrightStarr blog.

Read the whole thing here: http://www.brightstarr.com/US/Pages/blog-view.aspx?BlogID=52

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

“Access Denied” to Default.aspx on a SharePoint 2010 Sub Site

One of my clients went live with their SharePoint 2010 environment today.  We discovered that a certain group of users couldn’t access their default home page.  SharePoint responded with “Access Denied” and the usual “sign in as another user” or “request access” response. 

When we used the nifty “Check Access” function it confirmed that the end users really did have access.  Yet, they could not get to the page.

I followed a lot of roads to various dead ends until I decided to compare the web parts on the broken page against a similar working page.  I did that by putting the page in maintenance mode by adding “?contents=1” to the page. So, it looked like “http://server/subsite/subsite/default.aspx?contents=1”. 

This showed me two web parts named “Error” with a description like “Error” on the broken page.  I didn’t think to take a screen cap at the time.

I removed them and that solved the problem.

I’ve seen a question like this come up on the forums in the past and I was extremely skeptical about the poster’s insistence that he had security set up properly.  I *know* I had security set up right Smile  Next time, I’ll be more open and less skeptical.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

XSLT and jQuery Samples

I have been doing a lot of of XSLT and jQuery and thought I’d share a few snippets that others may find useful in future.

Example 1: Emit simple JavaScript / jQuery in XSLT:

<xsl:template match="something" xml:space="preserve">

  <!– Blank out the query friendly filters hidden field –>
  <script type="text/javascript">
    $(document).ready(function(){
      $("#QueryFriendlyFilters").val("empty");
    });
  </script>

</xsl:template>

That bit emits some JavaScript that waits for the page to finish loading (because of the $(document).ready(…)) and then sets the value of a hidden field named QueryFriendlyFilters to the literal value “empty”.

Example 2: Use <xsl:if> to check “greater than”,  “less than”, etc.

<xsl:template match="something" xml:space="preserve">

  <div id="fdcAllFilters">
 
    <xsl:if test="@Count>0">
      <span class="fdcFilterLabel">Current filters:</span>
    </xsl:if>

    <!– more stuff happens here. –>

</xsl:template>

The above snippet checks to see if an attribute named “Count” of the “something” element is greater than zero.  The XML behind this would be something like:”

<something Count=”5” />

Example 3: Iterate through all elements, interspersing jQuery calls.

<!– Iterate through all the filters and display the correct  links. –>
<xsl:for-each select="UserFilter">

  <a class="FilterHref" href="javascript:mySubmitPage(‘RemoveUserFilter’,'{@ID}’)">[X]</a>

  <span class="fdcFilterLabel"><xsl:value-of select="@FilterValue"/></span>

  <script type="text/javascript">

    $(document).ready(function(){
        <xsl:text><![CDATA[$("#QueryFriendlyFilters").val( ($("#QueryFriendlyFilters").val() + " ]]></xsl:text>\"<xsl:value-of select="@FilterValue"/>\"<xsl:text><![CDATA["));]]></xsl:text>
    });

  </script>

</xsl:for-each>

The above snippet is the most complex and there may be easier ways to do it.

The XML behind this looks roughly like this:

<UserFilter ID=”123” FilterValue=”xyzzy” />

This snippet is iterating through <UserFilter> nodes. 

It first emits an anchor tag that when clicked invokes a JavaScript function that is already on the page, “mySubmitPage” and passes the value of an attribute on the <UserFilter> node named “ID”. 

It then emits some jQuery that waits for the page to load.  That jQuery updates a hidden field named “QueryFriendlyFilters” by adding the value of the FilterValue attribute.  Note all the crazy <xsl:text> and <![CDATA[ … ]]> stuff.

That’s it, hope it helps!

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin