I spent most of last Friday developing a business system with Microsoft Office SharePoint Server (2007). I’ve worked on a few SharePoint sites over the years and I’m impressed at how much can be done using just standard functionality (lists, etc.) but, whilst the platform is powerful and flexible in many ways, it’s also intensely infuriating at times.
In developing this latest site, there were a few things that I had to Google for – and I’m hoping that posting them here might help others…
Changing the page layout
I created a new page using one of the templates provided for me by my IT department. Unfortunately I found that the webpart layout was a little too restrictive and I needed to change the page layout. I hunted around for a while (even after a colleague had told me to look for the page settings) and then I found a post by Shane Young that helped me out. As Shane descibes, the steps are:
- “Browse to the page
- Click Site Actions, Edit Page
- From the tool bar click Page
- In the drop down list click Page Settings
- Now pick your Page Layout
- Click OK”
With the new page layout in place I was able to get the page looking (almost) how I wanted.
Hiding the Title column from forms
My site is built around a document library with a number of columns. One of the default columns is called Title and it’s not really that useful to me as it really just duplicates the Name field (doubling up the details that users need to enter for a document in the library). I can always hide column from list views but I can’t delete it completely and the field still appears in forms. Sometimes, I repurpose Title by changing the column name but I can’t change the column type – it’s always a single line of text. Then I found John Owings’ post which describes the steps to hide the Title column from forms:
- “From the list view click Settings [then] List Settings
- On the Settings Screen, under the ‘General Settings’ heading, click ‘Advanced Settings’
- On the Advanced Settings screen click ‘Yes’ for the value: ‘Allow Management of Content Types?’
- Click ‘OK’
- Now, back on the Settings Screen, under the ‘Content Types’ heading, click ‘Item’
- On the Content Type Management Screen, under the ‘Columns’ section, click on the ‘Title’ column
- On the next screen click the radio button for ‘Hidden (Will not appear in forms)’
- Click ‘OK’”
Whilst I’m sure it’s possible to use inline CSS, my SharePoint pages resort to some awful HTML hacks at times, like using tables for layout (and then having to mess around with valign directives and other such code that I haven’t used in about ten years…). I probably shouldn’t admit to such awful practices but I also had to relearn something I’d forgotten many years ago – the use of internal anchors within a page.
It’s worth noting though that, using SharePoint’s Rich Text Editor to create a link to #anchor actually created a link to http://server.domain.tld/layouts/RTE2PUEditor.aspx#anchor. I had to explicitly include the full pathname (e.g. http://server.domain.tld/Pages/Page.aspx#anchor) in the link in order to avoid this behaviour.