I have a requirement to display SharePoint fields as a footer on only certain pages, so this rules out a master page change, and I haven't had any success with plain-old HTML.
What I'm trying to display is the following code:
<SharePoint:DeveloperDashboard runat="server"/>
<div class="s4-notdlg" style="clear:both; background-color:orange; padding:10px">
<SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server">
<CustomTemplate>
<br>Page Contact: <SharePoint:FormField FieldName="Page Contact" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
<br>Last modified on <SharePoint:FieldValue FieldName="Modified" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
by <SharePoint:FormField FieldName="Author" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
<br>Comments: <SharePoint:FormField FieldName="Check In Comment" runat="server" ControlMode="Display" DisableInputFieldLabel="True" />
</CustomTemplate>
</SharePoint:CreatedModifiedInfo>
</div>
When editing the page in Advanced Mode, no matter where I place the code, I break site definition. Is there a good place to insert this code in the page? Or does the Site Definition need to be changed.
Breaking the Site Definition may not be what you are thinking. It is just saying to you that the page is not one of the 'defaults' anymore, as a way to identify what have been customized on the site.
Every edit you make on those pages are like that, so it is OK to get that message. You may also "reset to site definition" when you want to, but this is not usually very stable on my experience.
Related
I can't find the source code for the html used for the calendar table. I have the webpart, but not the html for the table. I need to strip the inline CSS and attributes.
Following is the markup for the event calendar (obviously this is what you see):
<%# Control Language="C#" AutoEventWireup="true"
Inherits="CMSWebParts_EventManager_EventCalendar" CodeFile="~/CMSWebParts/EventManager/EventCalendar.ascx.cs" %>
<div class="Calendar">
<cms:CMSCalendar ID="calItems" runat="server" EnableViewState="false" />
</div>
<div class="EventDetail">
<cms:CMSRepeater ID="repEvent" runat="server" Visible="false" StopProcessing="true" EnableViewState="false" />
</div>
So what you see on the live page is created by CMSCalendar control, which leaves in CMS.Controls library, which means you can't modify it unless you have full source code of Kentico.
I'd try to change the appearance of this control with CSS, if CSS doesn't work there is javascript/jQuery.
Have you looked into creating a skin? You can change the css classes used if needed.
Might help some
I'm updating a publishing page in SP 2007 to include two hyperlink fields.
I've added the site columns and site content types, and updated the page layout with:
<SharePointWebControls:CurrencyField FieldName="ExistingField1" runat="server" />
<br />
<SharePointWebControls:UrlField FieldName="NewField1" runat="server" />
<br />
<SharePointWebControls:CurrencyField FieldName="ExistingField2" runat="server" />
<br />
<SharePointWebControls:UrlField FieldName="NewField2" runat="server" />
When I open the page in edit mode, neither of the two newly added fields are there. The page source simply displays the old fields with an addition where the new field should be.
<div align="left" class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer" nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Existing Field 1</span></div><div class="ms-formfieldvaluecontainer"><span dir="none">
<input name="ctl00$PlaceHolderMain$EditModePanelB$ctl49$ctl00$TextField" type="text" id="ctl00_PlaceHolderMain_EditModePanelB_ctl49_ctl00_TextField" title="Existing Field 1" class="ms-input" Size="11" style="ime-mode:inactive;" /><br>
</span></div></div>
<br />
<br />
<div align="left" class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer" nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Existing Field 2</span></div><div class="ms-formfieldvaluecontainer"><span dir="none">
<input name="ctl00$PlaceHolderMain$EditModePanelB$ctl51$ctl00$TextField" type="text" id="ctl00_PlaceHolderMain_EditModePanelB_ctl51_ctl00_TextField" title="Existing Field 2" class="ms-input" Size="11" style="ime-mode:inactive;" /><br>
</span></div></div>
<br />
I have checked a dozen times to make sure my Field Names are typed correctly and checked the layout in, then out, and approved the layout multiple time.
Any ideas?
I figured out what was going wrong. The new columns also have to be added to the page list in addition to the site column and content types. I should have seen that one coming from a mile away. (Forehead meets desk) =P
I use SharePoint 2010 Standard Edition.
I have custom form for creating/editing items, and few fields with ControlMode="Display", like:
<SharePoint:FieldLabel ID="CustomStatusLabel" runat="server" FieldName="CustomStatus" ControlMode="Display" />
<SharePoint:FormField ID="CustomStatusField" runat="server" FieldName="CustomStatus" ControlMode="Display" />
When I open this form, all fields which are in ControlMode="Edit" displayed properly, but CustomStatus field is displayed exactly like this:
Custom Status ["Custom Status" column value]
Strangely enough, I saw this custom form working on different server...
I'm new to SharePoint and am looking to add some custom links or buttons to the ribbon (only want these to show on the ribbon when the advanced ribbon menu controls are not showing, if that makes sense). I'm on SharePoint Online (2010 edition, but will convert to 2013 shortly).
Here's a screenshot of where I'm looking to add links or buttons.
I think the code section in the v4.master that controls this area is this section but I'm having problems getting my links to show up in the correct area.
<div class="s4-trc-container-menu">
<div>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
</div>
Any suggestions? Much appreciated!
Assuming that you are using v4.master as your master page (default), there is a control with an ID of "RibbonTabRowRight" that surrounds the code snippet you have posted.
Any links and buttons that you want to add should go within this control, and before the Welcome Menu (the snippet you have posted). Whether you use a simple anchor tag or a more complex control depends on your requirements.
Example:
<SharePoint:SPRibbonPeripheralContent
runat="server"
Location="TabRowRight"
ID="RibbonTabRowRight"
CssClass="s4-trc-container s4-notdlg">
<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
<div class="s4-trc-container-menu">
<a href="EXAMPLE.ASPX" />MY EXAMPLE</a>
<div>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
</div>
<SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
<span>
<span class="s4-devdashboard">
<Sharepoint:DeveloperDashboardLauncher
ID="DeveloperDashboardLauncher"
NavigateUrl="javascript:ToggleDeveloperDashboard()"
runat="server"
ImageUrl="/_layouts/images/fgimg.png"
Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
OffsetX=0
OffsetY=222
Height=16
Width=16 />
</span>
</span>
</SharePoint:SPRibbonPeripheralContent>
I have a custom masterpage in sharepoint and want to output the site title in a different part of the page. Currently I can see the site title which is outputted using the following code:
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" Visible="true" />
Apparently using
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" Visible="true" />
Should also output the title but is returning nothing. Any ideas what is going wrong?
The Code you have mentioned are the Content Place Holders where you can replace the Content, You can place the register the below tag in the top the page and
<%# Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
And place the below code to get the Title of the Page
<SharePoint:ProjectProperty Property="Title" runat="server" />
If you want to do that in the master page level you can do with the below code
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" Visible="true">
<SharePoint:ProjectProperty Property="Title" runat="server" />
</asp:ContentPlaceHolder>
Unless you override the above content place holder you will get the Title of the Web Automatically
This can be done by using the ProjectProperty control (see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.projectproperty.aspx)
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">
<SharePoint:ProjectProperty property="Title" runat="server" />
</asp:ContentPlaceHolder>