Wednesday, 12 November 2008

The form has been closed. Xmlformview web part

When addding the xmlformview web part to a sharepoint page, you may get an error that fills the full page saying "The form has been closed". Since this error fills up the full page you will not be able to edit the properties of the web part that you have just added.

To fix this problem follow the steps below.

1. Navigate to the page library where the web part page is located
2. Click on the options on the page and click "Edit Properties"
3. At the bottom of the properties page, click on "Web Part Page Maintenance".
4. Using the web part maintenance page close the xmlformview web part
5. Go back to the page where you added the web part and click on add a webpart
6. Instead of choosing the xmlformview web part from the web part list click on advanced and select the xmlformview web part from the "Closed Web parts" list
7. Now the web part would be added and the web part properties displayed
8. Edit the web part properties and add the url of the infopath form in the xsn location field in the Data category
9. In the Feature Catergory set the editing status dropdown value to "editing"

Other websites recommend you to add the xmlformview web part again from the main list after closing the web part that you added first but that did not work for me.

Tuesday, 11 November 2008

Console Configuration File Error: XML Exception: Object reference Sharepoint

If you get the error below in your event viewer
Console Configuration File Error: XML Exception: Object reference not set to an instance of an objet

and the message Object reference not set to an instance of an object! at the area where you would expect your page editing toolbar then the reason is that the xml files in Editing Menu folder in the Master Page gallery are not in the Published state.

To fix this, just publish all the xml files in the folder Editing Menu and approve them!

Tuesday, 23 September 2008

Customising Ontolica Search

As you know when you instal Ontolica on a Moss box it overrides the default sharepoint delegate search control with ID "SmallSearchInputBox", this is the searchbox that we are customising below.

To customise ontolica search, i.e. to change the search magnifying image button or to change the css classes you just need to modify the xslt file that ontolica uses.

This can be found in the location RootSite/OntolicaStyles/Forms/Allitems.aspx and open the folder SearchBox and edit the default.xslt file in here...you can change the images, change the borders around the search boxes etc.

You do not need to do an IISRESET but it seems to take a while before the changes are reflected on the page so if it is a dev box do an IISRESET to see the changes immediately.

Monday, 22 September 2008

SharePoint Search Customisation (Ontolica)

If you want to modify the basic search in SharePoint just edit the properties in the SearchArea.xml file located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\OSearchEnhancedFeature and C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\OSearchBasicFeature

You can easily customise the Show Scope dropdown, show advanced search option, width of the textbox etc. Only a few properties are set in the xml file but more properties are available and can be added...have a look at the website below for a complete list of properties.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.webcontrols.searchboxex_members.aspx

If you have installed ontolica search and want to modify the dropdown and advanced search option then you can do that by going to Site Actions - Site Settings - Modify All Site Settings - Ontolica Search Box Scopes and clicking on the settings button on the toolbar

Thursday, 18 September 2008

Multiple levels of SharePoint menu

By default only the main sites and sub sites are displayed in the top harepoint menu, if you want further level of sites to appear on the top navigation you just need to modify the SharePoint menu option in the master page.


Before doing this open the default master page in sharepoint designer and take a copy of it and play with the copy just in case if you mess it up can you always revoke back.
Edit the master page in Sharepoint designer and find the tag and change the contents of it to look something like below, the key value is the MaximumDynamicDisplayLevels changing it to 1 or more will give you additional sub menus


DynamicHorizontalOffset="0"

DynamicVerticalOffset="0"

StaticEnableDefaultPopOutImage="false" Runat="server"

DataSourceID="LeaveThisValueUntouched"

Orientation="Horizontal"

StaticDisplayLevels="2"

MaximumDynamicDisplayLevels="2" //this sets the number of levels

StaticSubMenuIndent="0" //you can indent the sub menu as you wish

ItemWrap="false"

SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>"

CssClass="topNav">


Save the modified master page and that's it!


If you have taken a copy and have changed the copy then you need to go to Site Settings - Master Page option in your sharepoint site and from the drop down choose the new master page.

keywords: dynamic menu sharepoint, multi level menu, advanced menu, top navigation sharepoint

Tuesday, 16 September 2008

Sharepoint site templates

When creating a new sub site in SharePoint, you can restrict users on what kind of site template they can use to create the sub site.

You can specify which individual site templates users can see when they create sub sites, for instance you can enable just the publishing site template so that all subsites are of type publishin site.

This option can be set by modifying the Root level site settings and choosing the option "Page Layout and Site Template Settings" under the heading "Look and Feel".

Adding a pdf icon to MOSS 2007

MOSS 2007 does not display icons for pdf documents OTB.

To add this icon follow the steps below

1. Download a pdf icon, there are a few ones on the site, for consistence sake choose the one with a 16 x 16 resolution, http://www.adobe.com/misc/linking.html
2. Save the icon to 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images' folder
3. Edit DOCICON.XML found in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML
4. Add the line to the document and save it