Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

MOSS - WCM - Using PublishingWeb.GetPublishingWeb(SPContext.Current.Web)

  Asked By: Ronald    Date: Apr 18    Category: MOSS    Views: 2271

I am trying to do some custom coding in a webpart to retrieve information from page library.

However the page can't be load after having "PublishingWeb publishingweb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web);" in the code. Is it not technical possible to do that or I have miss out something?

Content Query Web Part provided might be able to do the job but it takes a lot of effort on the xslt portion.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Christop Mcfadden     Answered On: Apr 18

What do you mean the “page can’t be load” … do you get an error? Do you check in the code  to see that you’re actually getting a SPWeb object back from the SPContext.Current.Web? Try trapping it in a try-catch block?

Hard to say if the CBQ Web part  will do the job  without more explanation of what the problem really is.