Wrox Programmer Forums
|
BOOK: Professional SharePoint 2010 Branding and User Interface Design
This is the forum to discuss the Wrox book Professional SharePoint 2010 Branding and User Interface Design by Randy Drisgill, John Ross, Jacob J. Sanford, Paul Stubbs, Larry Riemann ; ISBN: 978-0-470-58464-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SharePoint 2010 Branding and User Interface Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 4th, 2011, 05:33 PM
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..
 
Old May 12th, 2011, 12:35 AM
Wrox Author
 
Join Date: Dec 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I think I understand your question, and I'm wondering if /blogs/ is a site collection or just a site. ~sitecollection will take you to the root of the site colleciton... while ~site would be the root of the current site.

That being said consider that the NavigateUrl is simple used to set the link that is followed when the site logo is clicked. The CssRegistration and SiteLogoImage aren't using the site collection relative link here, so "/" references the top level of the web application. So the CSS and image in the 2nd example are looking at the root of the web app for the sub folders where the 1st example is looking at the root/blogs.

Does that make sense?





Similar Threads
Thread Thread Starter Forum Replies Last Post
having problem with NavigateUrl - page 285 sarala BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 August 4th, 2010 08:07 AM
ASP4-problems with NavigateUrl property stormage BOOK: Beginning ASP.NET 4 : in C# and VB 4 June 3rd, 2010 01:14 PM
Chapter 8 NavigateURl ChuckASP BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 March 7th, 2010 07:52 AM
NavigateUrl and Target spacy ASP.NET 1.x and 2.0 Application Design 9 November 5th, 2007 12:23 PM
Strange Problem with NavigateUrl in TreeView kalchev ASP.NET 2.0 Basics 3 May 2nd, 2006 02:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.