Thread: NavigateUrl
View Single Post
  #1 (permalink)  
Old May 4th, 2011, 05:33 PM
moswalt moswalt is offline
Registered User
 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default NavigateUrl

My question is on the NavigateUrl and why do I have to go one level higher than I thought needed. Here is my setup.

I have a site collection http://server/blogs using the blog site template
blogs is an explicit inclusion managed path
started with Mr. Drisgill's foundation starter page
style.css in Site Assets
logo.png in Site Assets

This code works:
<SharePoint:CssRegistration name="/blogs/Site Assets/style.css" After="corev4.css" runat="server"/>

<div class="customLogo">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">
<SharePoint:SiteLogoImage LogoImageUrl="/blogs/SiteAssets/logo.png" runat="server"/>
</SharePoint:SPLinkButton>
</div>

This code doesn't, but I expected it to based on how you set your links in Chapter 8 page 232-233:
<SharePoint:CssRegistration name="/SiteAssets/style.css" After="corev4.css" runat="server"/>

<div class="customLogo">
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">
<SharePoint:SiteLogoImage LogoImageUrl="/SiteAssets/logo.png" runat="server"/>
</SharePoint:SPLinkButton>
</div>

Is this due to it not being a publishing site??

Thanks in advance and love the book.

Last edited by moswalt; May 4th, 2011 at 05:39 PM..
Reply With Quote