Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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..
Reply With Quote
  #2 (permalink)  
Old May 12th, 2011, 12:35 AM
Wrox Author
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.