Today i was tasked with editing the search results page in our enterprise search centre. I'd noticed before that the results page doesn't contain a ribbon or even the site actions menu. I didnt really take any notice before as i hadnt any need for either. However when i came to edit this page i was stumped. how can i get the page into edit mode so i can make changes to the search results web part.
A quick google search provided me with the solution. Simply append the following value to the url of the search results page
?ToolPaneView=2
so your url might look something like this
http://somedomain.com/SearchCentre/Pages/peopleresults.aspx?ToolPaneView=2
Hope this helps someone.
My Adventures In SharePoint Land
Thursday, 16 May 2013
Thursday, 2 May 2013
Changing the Title Column to something more relevant in a content type
Today i was tasked with creating a custom content type for a calibration system we are putting together. I didnt want the default Title column so i decided to rename it to something more relevant. I needed to rename the column to Company Name. After some research it seems this is possible. Simply reference the column (s) in your custom content type
<FieldRef Name="LinkTitle" ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" DisplayName="Link Company Name" Sealed="TRUE"/>
<FieldRef Name="LinkTitleNoMenu" ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" DisplayName="Link No Menu Company Name" Sealed="TRUE"/>
<FieldRef Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="Company Name" Sealed="TRUE"/>
One thing to remember is to set the inherit property of the custom content type to false
<ContentType ID="0x0100a6669fd796344f1c8e02cbc9a42e7b37"
Name="Calibration Equipment Contact"
Group="Custom Content Types"
Description="Contact type used for the calibration system"
Inherits="FALSE"
Version="0">
<FieldRef Name="LinkTitle" ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" DisplayName="Link Company Name" Sealed="TRUE"/>
<FieldRef Name="LinkTitleNoMenu" ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" DisplayName="Link No Menu Company Name" Sealed="TRUE"/>
<FieldRef Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="Company Name" Sealed="TRUE"/>
One thing to remember is to set the inherit property of the custom content type to false
<ContentType ID="0x0100a6669fd796344f1c8e02cbc9a42e7b37"
Name="Calibration Equipment Contact"
Group="Custom Content Types"
Description="Contact type used for the calibration system"
Inherits="FALSE"
Version="0">
Tuesday, 30 April 2013
Add CSS / JavaScript to custom Publishing Page layout
Ever wondered how to add css / Javascript into a custom publishing page layout. I did!!!! Just add the PlaceHolderAdditionalPageHead content placeholder tag and voila!!!!
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
//some css
</style>
<script type="text/javascript">
//some js
</script>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
//some css
</style>
<script type="text/javascript">
//some js
</script>
</asp:Content>
Invalid Associated Content Type
Recently I have been working on a project creating custom publishing page content types and layouts in Visual Studio. All seemed fine, the deployment went as expected and off I went to create my new page based on the custom content type / page layout I had created. After selecting the content type from the menu I was redirected to the create page when i noticed that the page layout option was preceded with the words "(invalid Associated Content Type)". Having never seen this before I was at a lost. I did a quick retract and deploy to see if something had gone wrong during the deploy to no avail. Being a bit lost at this point i fired up chrome and copied the error message into google. A quick scan of a few websites revealed my problem. It seems you need to reference the content type in the content type like so:-
<FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />
A quick redeploy and test verified that this did indeed solve my problem. Don't ask me why!!!!!!
Subscribe to:
Posts (Atom)