Skip to main content

SharePoint Blog

Go Search
Home
SharePoint Blog
  

brettlonsdale.com > SharePoint Blog
Are Custom Site Definitions still useful?
I have been asked at TechEd this week why anyone would still want to create Site Definitions.  We should be doing everything with Features was the comment.  Well, after hearing that argument, I thought about it, and I still beleive that Custom Site Definitions have their place in SharePoint Development.  They simply use the Features that we create.
A lot of goals can be acheived with Features, and Custom Site Templates (STP's).  However, if you need to get more granular, Site Templates do not provide you with enough granularity without modifying Sites within Microsoft SharePoint Designer. for instance.  What if we want to create additional Web Part Zones on the Default.aspx, specify an Alternate CSS file, imbed additional code?  The only way to do this with a Site Template is to create a Customized Site as the basis for our Template.  It then has to remain customized otherwise we would lose the changes that we made upon resetting to the Site Definition.
 
Site Definitions can also be easily changed in the future, and they can be deployed using WSP's.
 
Another reason for using them is when using WCM.  The Publishing Site Template provides you with way too much stuff that you don't need, and the Blank Site provides you with too little.  So creating a Custom Site Definition based upon the Publishing Site Template, and removing all the non-required features etc is a good way to go.
 
Brett
TechEd Orlando 2008
I am around at TechEd Orlando 2008 if anybody wants to meet up.  Drop me an email so we can arrange to meet.
 
Visual Studio 2008 Load Test
Steve Smith (MVP) has authored the following whitepaper, which we found extremely useful recently when testing our Custom Web Parts.  Thank you Steve!
 

The scenario that this whitepaper addresses is where an organization is planning to use SharePoint Server 2007 as well as those who currently use SharePoint Server 2007. Organizations can use this whitepaper to test whether their planned or current hardware will support the envisaged user scenarios. *Note* It is not the intention of this whitepaper to show you real world benchmark results the intention is to show you how to get started with configuring and managing your stress tests.

Read On....  

http://www.combined-knowledge.com/Downloads/HowToConfigStressTestProjectForMOSS07usingVS2008TS.pdf

Lightning Conductor Web Part
Its name has already been criticised! However, the Lightning Conductor Web Part Conducts list items from within, or across multiple site collections in a SharePoint Web Application.
 
The Microsoft Content by Query Web Part can only work within the boundaries of the site collections. 
 
So, if you want to aggregate information across site collections, give our lastest web part a go:  http://www.lightningtools.com/pages/lightning-conductor-web-part.aspx
 
 
Manipulating BDC Data with SharePoint Designer
Take a look at my latest whitepaper.  Learn how to add style to BDC data using the Data Form Web Part.
 
 
 
SSO BDC is Easy!

First of all, let’s clarify why we need to use SSO with BDC.  Usually Single Sign-On (SSO) is used for Credential Mapping so that you are not prompted again for your username and password when accessing data from a backend system.  Meaning that, if you have already logged onto SharePoint, and you are a member of a domain group, your credentials will be mapped to a user account that has permissions to access the database, and SharePoint doesn’t need to challenge you again for your credentials.

Where BDC is concerned that hurdle can be overcome in other ways as well as using SSO.  BDC can use different Authentication Mechanisms such as Passthrough or RevertToSelf.  If using RevertToSelf you are asking the Application Pool ID to access the database for you, so that each user doesn’t need a specific login account locally at the database.  Using PassThrough means that the users’ credentials are passed through to the database and the user will require a login account and permissions to the database. 

read on in the whitepaper.......

http://www.brettlonsdale.com/Shared%20Documents/BDC-SSO%20WhitePaper.pdf

WSS v3.0 Site Definitions without VSeWSS

Having been a SharePoint developer for some time now, I am used to creating Site Definitions, Web Parts, List Definitions etc without the need for a Visual Studio Wizard. I know obviously beginners to SharePoint will find this VSsWSS easier to use than doing everything manually, but I do feel that VSeWSS has a few issues that we could do without. One of the tasks that VSeWSS intended to make easier was the creation of a Site Definition.

You have two options for creating a re-usable Site Template in WSS! Create a Site Template (as in STP) or create a Site Definition (as in ONET.xml). I usually head straight for Site Definitions unless the change I'm making is very subtle such as adding a new list into my site. The reason why I use Site Definitions is because I can do things in the ONET.xml file, that I can't do in the UI of SharePoint. E.g. I can specify an Alternate Style Sheet, an Alternate JS file, and change the Layout Zones. Ok, yes you can do this if you use SharePoint Designer, but then your site will be Customized (Unghosted). If you attempt to Reset to the Site Definition before saving it as a template, you will lose all your settings. The CSS file you specified will be lost, and so will your Web Part Zones.

So, my question is this! VSeWSS allows you to generate a Site Definition from a site that you have customized using the UI of SharePoint! But why use it if I could do the same using a Site Template? Ok, you will get a WSP generated if you use VSeWSS for easy deployment. But STP's are also portable if you save them out to the file system, you can deploy them easily using STSADM.exe –o AddTemplate.

So, lets take a look at how we can create a Site Definition with and without VSeWSS.

Without VSeWSS

1. Navigate to the SiteTemplates folder in the 12 Hive: (c:\program file\common files\microsoft shared\web server extensions\12\TEMPLATE\SiteTemplate)

2. Copy and Paste the STS folder naming it customsts

         

3. We won't make any changes yet, we will just get the plumbing working! Navigate to 12\TEMPLATE\1033\XML. Replace 1033 for your LCID.

4. Take a copy of WebTemp.xml and call it WebTempCustom.xml (The file must be prefixed with WebTemp).

5. Strip the WebTempCustom.xml file out so that it only includes the Templates element for the STS template.

         

6. Rename the Template to reflect the name of your folder you created i.e. CustomSTS. Change the ID to something about 9999, and change the Title of each template to Custom Team Site, Custom Blank Site, and Custom Document Workspace.

7. Save your file, Run IISRESET, and try it out. You should notice that in SharePoint you get Custom Team Site, Custom Blank Site, and Custom Documents Workspace in your Collaboration Tab on the Create Site or Workspace page in SharePoint. Note that you could also change the tab that these sites appear under using an attribute of the configuration element for each template.

8. Change the ONET.xml to include a Contacts List in a Team Site like it did in SharePoint 2003.

9. Open the ONET.xml file from your CustomSTS\XML folder in Visual Studio.

10. Navigate to line 90 which should be the Task list for Team Sites (hence it is in configuration 0).

11. Copy Line 90 and paste it on the line below.

12. Change the word tasks for contacts everywhere on that line you pasted, and change the Feature ID to the one shown in the image. It can be copied and pasted from the Feature.xml file for the Contacts List.

 

13. Save your changes. Run IISRESET Again, and then test your changes by creating a new site from the Custom Team Site template.

With VSeWSS

1. Download and Install VSeWSS from http://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&displaylang=en

2. Create a new Team Site in WSS.

3. Create a New Contacts List in the new Team Site you created.

4. Start the Microsoft Solution Generator by choosing Start, All Programs, Solution Generator.

5. Select Site Definition from the Wizard

6. Type the URL of the Site you are basing your Site Definition on and choose Next.

7. Give your Project a Name such as VSeWSS TEST

8. Choose Next, and then Finish.

9. Open the Project by navigating to My Documents, SharePoint Definitions, VSEWSS TEST, and double click the csproj file.

10. Take a look at the ONET.xml file in Visual Studio that VSEWSS generated! What an earth is that lot????

12. Click the Build icon in Visual Studio. You should find that the Solution then gets deployed and you can test it.

In summary, I don't like all the rubbish that gets placed in the ONET.xml file, plus I thing the steps with VSEWSS are more long winded to achieve the same results!

 

Custom List Definitions – WSS v3.0 – Fields not displaying

I've had a few delegates email me in the past asking about why when they create a custom list definition in SharePoint 2007, the custom field doesn't display in the New Form or Edit Form for the list. They initially thought that it was to do with a 'Display in New Form' attribute that can be set to True or False, but claimed that it was in fact set to True.

Upon investigating this issue, I realised that all of the instances where this had happened, the developers had copied an existing Feature such as 'Contacts List' and renamed the Feature giving it a new GUID, Title, Description etc. The one thing they hadn't changed was the 'Content Type' which was set in the Schema.xml for the list that they copied. (See below)

If you remove the Content Type that the Schema is referencing, all is well and good and your custom column will display.

Data Viewer Web Part for WSS v3.0 including Integrated Security!

Ever since I recommended to a customer (well not really just a customer A big Customer and a customer that happens to be my father in laws company) to use Windows SharePoint Services v3.0 as a way to display Microsoft Navision data to their remote offices, and then found the Data Form Web Part in SharePoint Designer no longer supported Integrated Security, I made it my goal to sort this issue out. I tried every which way to connect to a SQL database using Integrated Security, and the answer is you just can't! Not unless you use MOSS and get SSO or MOSS Enterprise and get BDC.

So, we at Lightning tools have written a web part that not only allows you to connect to SQL databases using Integrated Security, but also allows you to configure the whole thing without any need whatsoever of SharePoint Designer. It is that simple to use, that as long as you know the name of your SQL box, the rest is a breeze! Choose the database, then the table, and then the columns and your data is displayed. You can also filter the data returned, configure caching, apply conditional formatting, connect two or more of the web parts together for related tables etc.

The web part has been tested by Husky Group (My father in laws company), and successfully used for displaying Navision data! Thank God! J

The below image illustrates how you can view the SQL data via the new DVWP:

You can configure the Database connectione easily using the following properties:

The Conditional Formatting can also be applied without any need for SharePoint Designer, and therefore no need to customize (unghost) the page.

and Finally Caching can also be configured:

The Web Part is available now on www.lightningtools.com.  Any body wishing to trial the version is welcome.  email me on brett@lightningtools.com

 

KPI’s for BDC Entities

Yesterday we launched the BDC KPI Web Part that extends what you can do with the MOSS Out of The Box KPI's. You can create KPI's on SharePoint Lists, SQL Analysis Services, Excel Workbooks, or manually entered data using the standard SharePoint KPI List and Web Parts. I have created a web part that allows you to now base your KPI's on BDC data as well. The Web Part currently allows you to create KPI's based on a count of records returned from the Entity, create an average function on a column, or use the Sum function on a column. At the moment, the filtering is done using the Application Definition file which can be created using BDC Metaman. Hopefully soon, you will be able to filter the data further using the KPI List itself. The Web Part is for sale on LightningTools.com and includes the source code for further in house development.

Configuring the KPI Web Part via a custom List, and Field Types.

The Web Part showing KPI's based on the Adventure Works Database

1 - 10 Next

 ‭(Hidden)‬ Admin Links