Saturday, January 29, 2011
It made me wonder if Google use the same approach as part of their page ranking algorithm?
If it did, you could perhaps post links to a site with a special query string, making use of the Google "I'm feeling lucky" to simulate a click e.g.
Of course that would be too easy to abuse, which is why Google don't do it.
However, our in-house SEO experts told me that Google Instant search did allow something similar and was exploited.
Friday, January 28, 2011
(BTW, you can use the SPFieldUrlValue class to extract the URL and description).
Anyhow, I wanted to generate a relative path from stored absolute value. I used the following code to do it.
Maybe you know a better way.....?
SPFieldUrlValue spFieldUrlValue = new SPFieldUrlValue(fieldValue);
string targetUrl = spFieldUrlValue.Url;
using(SPSite site = new SPSite(targetUrl))
return targetUrl.Replace(site.Url, String.Empty);
Tuesday, January 25, 2011
- Only show sites
- Only show 2 levels of navigation
This article gave me an insight and I was then able to come up with this as the solution:
<SharePoint:AspMenu ID="FooterGlobalNav" runat="server" DataSourceID="GlobalNavDataSourceFooter"
Orientation="Vertical" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" UseSimpleRendering="true" />
<publishingnavigation:portalsitemapdatasource id="GlobalNavDataSourceFooter" runat="server"
sitemapprovider="CombinedNavSiteMapProvider" showstartingnode="false" startfromcurrentnode="false"
startingnodeoffset="0" trimnoncurrenttypes="Heading" treatstartingnodeascurrent="true" />
Friday, January 21, 2011
The error only occurred on the root site.
It turns out this was because the home page of the root site (default.aspx) uses a page layout which references some custom user controls in the CONTROLTEMPLATES folder and my colleague's VM did not have these.