Sweet. I was that close. ;)

Thanks Dan.

From: [email protected] [mailto:[email protected]] On Behalf Of 
Daniel Brown
Sent: Tuesday, 7 June 2011 10:58 AM
To: 'ozMOSS'
Subject: RE: 2007 - currentPublishingSite

SPContext.Current.Web.Title

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.title.aspx


However, I'd do something like.

if (SPContext.Current.Web.Title.ToLower() == "news")
{
// do something here
}


Alternatively

if (SPContext.Current.Web.Title.ToLower().Equals("news"))
{
// do something here
}



From: [email protected] [mailto:[email protected]] On Behalf Of 
Dan Sheedy
Sent: Tuesday, 7 June 2011 10:23 AM
To: ozMOSS
Subject: Re: 2007 - currentPublishingSite

Hey Paul.

I think you can test the current web title with;

if (SPContext.Current.Web.ToString() == "News")
{

}
On Mon, Jun 6, 2011 at 1:34 PM, Paul Noone 
<[email protected]<mailto:[email protected]>> 
wrote:
Hi all,

I am trying to check if the current site's Title (or Name) equals "News" but 
appear to be having some syntax issues. :)

Can someone please point me in the right direction?

if (currentPublishingSite.Title.Equals("News"))

Kind regards,

Paul Noone

---------------------------------------------------
Online Developer/SharePoint Administrator
Infrastructure Team, ICT
Catholic Education Office, Sydney
p: (02) 9568 8461
f: (02) 9568 8483
e: [email protected]<mailto:[email protected]>
w: http://www.ceosyd.catholic.edu.au/


_______________________________________________
ozmoss mailing list
[email protected]<mailto:[email protected]>
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to