Archive for March, 2008
Just a quick one that I came across today – when you are referring to an SPWeb object and need to go through the content types for that web, the SPWeb.ContentTypes property will only show you a list of content types that have been defined at that site level, not a full list of Content [ READ MORE ]
If you have ever had a look at the ID of a content type in a WSS or MOSS site, you might be wondering why it isn’t simply another guid value like every other identifier of pretty much anything in SharePoint. Well there is a reason for this, and it is actually quite cool when [ READ MORE ]
After a conversation with one of the guys on my team, I found myself needing to explain the difference between the two master page settings that exist within a SharePoint 2007 site, so I thought I would put together a blog post about it as I couldn’t easily find the answer I was looking for. [ READ MORE ]
When you have a web.config file that has a ridiculously long list of AppSettings you might want to consider this one – custom configuration sections. Basically by doing this you can create new sections in a config file that will allow you to group your settings in a more sensible way, and the cool bit [ READ MORE ]
I know this one was already psoted about the other day on Ishai’s blog, but it’s one I wanted to put up here as I had no idea about this. Basically there is a way that you are supposed to use and dispose of your SPSite, SPWeb and SPPublishingWeb objects when you use them in [ READ MORE ]
After not blogging yesterday I thought I would do a second post today. A couple of days ago where I described how to create a list view web part in code I said I would cover how to make a view in code as well, so here is that post! Creating a view in code [ READ MORE ]
UPDATE 18/12/2008: Apparantly this code is no good if you have the infrastrcutre update applied (I am yet to re-test, but I did warn you that it might break with an update!). If you are having issues with it though, Ton Stegeman made a post about how he was able to resolve the issue. It [ READ MORE ]
The MOSS navigation system is pretty easy to customise through the UI, but today I had a need to be able to create custom links in the quick launch through code. It’s a pretty simple bit of code, using classes in the Microsoft.SharePoint.Navigation namespace. SPSite site = new SPSite("http://servername"); SPWeb web = site.OpenWeb(); SPNavigationNodeCollection [ READ MORE ]
Another week brings another thing that I have learned about SharePoint. This time I needed to be able to add a list view web part to a page in code. The assumption in this case is that the list and the view you are already using exist (I should write a post on how to [ READ MORE ]
Keeping on with my run of posts about stuff that can be done with features, here is the latest thing I have done. The scenario this time is that we want to have a feature that will not only deploy a masterpage when it is activated, but we want to set it as the current [ READ MORE ]
Subscribe in a reader
Subscribe by Email