How to add extra fields to your CQWP that dont display as standard

By peter.stilgoe





1) Export your Content Query Web part to your desktop

2) Open it with Notepad and look for the following line of code:

3) Change this line to the following, and replace the portion MYINTERNALCOUMNNAME with the internal column name for your column

4) Save your file

5) Import the web part

- Edit page
- Add Web Parts
- Switch to advanced
- Switch from browse to import
- Browse to your file and upload you file

Now when you go to apply a filter, you will see your custom column.

  • Share/Bookmark

Formatting Text / Questions in Sharepoint Surveys

By peter.stilgoe





If you have ever tried to format text and / or insert line breaks into your questions in sharepoint surveys, you’ll know its not an easy task. However by adding some simple javascript you can format the text in your questions as you want.

Basically at the bottom of your survey page add a Content Editor Webpart & insert the follow script:

You will see the script is mapping your HTML standard HTML command to keywords to trigger your formatting.

So say you wanted your question to appear in italics, you would edit your question as normal but insert the italic keyword triggers ie.

How old are you?

To appear in italics you would write the question as:

startitalic How old are you? enditalic

Now your question will appear in italics and so on……..

If you cant edit your survey page to add you CEWP see the previous post on how to edit this page.

  • Share/Bookmark

Need to edit a sharepoint page but there is no edit option

By peter.stilgoe





You need to edit a page in Sharepoint but the ‘Edit’ option is greyed out for example on a survey page.

Simply append NewForm.aspx with ?ToolPaneView=2 so it looks like

/NewForm.aspx?ToolPaneView=2

You now have your page in edit mode so you can add webparts etc

  • Share/Bookmark

Content Type Toolbar Web Part

By peter.stilgoe

The Content Type Toolbar is a simple add-on that will enhance the use of SharePoint Content Types in large deployments.

The use of content types in SharePoint 2007 has a number of benefits and businesses may spend a considerable amount of time planning and deploying content type to help support their business processes. Unfortunately, the default methods of using content types may not be intuitive for most users who do not have experience with SharePoint. This problem will lead to content types not being used or being neglected by the end users. This can be avoided by training your end users, but it may be sometime before all your users receive the appropriate level of training, so in the meantime the content types are still neglected.

Get it here…

  • Share/Bookmark

View PDF documents in a webpart

By peter.stilgoe

You can view PDF’s on your Sharepoint pages suprisingly easily using the CEWP.

Add a CEWP & add the following code:

The only dependency is that your clients will need Adobe Reader installed locally on their PC.

  • Share/Bookmark

The Content editor web part and Javascript

By peter.stilgoe

If you didnt know the content editor web part (CEWP) is a great way for adding code ie. JavaScript to your Sharepoint pages without having to edit / change the actual code. You need to add the CEWP to the bottom of your Sharepoint page & add the piece of script. Hey presto, desired effect without editing the actual code, a nice clean & easy way to make mods etc.

A couple of tips if you break your page with some bad code:

If you break your Web page:

When playing with the CEWP, you run the risk of adding bad code that will break your page. SharePoint will then throw out an error message, without offering any way to undo your changes.

If this happens to you, here is a useful trick: append the “?contents=1” querystring to your URL. It will give you access to the maintenance page, where you’ll be able to get rid of the faulty Web part.

For example, if you inadvertently break this page:

http://ThisServer.com/sites/ThisSite/ThisLibrary/allitems.aspx

Enter:

http://ThisServer.com/sites/ThisSite/ThisLibrary/allitems.aspx?contents=1

A trick to edit Web Part pages:

On some pages, the edit option is not available or is grayed out. This is for example the case for the edit form of a list.

The workaround here is to append the “?ToolPaneView=2” querystring to your URL, which will switch your page to edit mode. Note that it seems to be unsupported by Microsoft, though I haven’t read an official confirmation.

For example, if you want to edit:

http://ThisServer.com/sites/ThisSite/Lists/ThisList/editform.aspx

Enter:

http://ThisServer.com/sites/ThisSite/Lists/ThisList/editform.aspx?ToolPaneView=2

Thanks to http://pathtosharepoint.wordpress.com for the above 2 tips

  • Share/Bookmark

About Me

Sharepoint / MOSS / K2 /Nintex / IA / BI / InfoPath Consultant