I am new to SharePoint branding. I want to put a background-image that covers the entire content part of one page. When I put it in the Master page (e.g.,Additional Page Header), it bleeds onto all pages,lists, etc. in the site. How do I do this?
Open the page in sharepoint designer
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
body {
background-image: url('...');
}
</style>
</asp:Content>
Related
I'm trying to create a locked down stock item lookup with only a few fields that is ready-only, but I can't disable the Notes and File attachments. I've tried setting up a role with only view access to the stock items screen and locking down the individual objects on the screen and revoking all other screens, including the hidden screens.
I've also tried to create a generic inquiry with view only access but the initial file and note columns still appear and are not locked down.
Is there anyway to do this without creating a custom page? I am working on v5.3.
UPDATE 3/31: Based on my comment below, does overriding the CSS class for the toolbar create any major problems or concerns? I do understand this hides the customization and help button along with the Notes and Files.
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<style type="text/css">
.toolBarT { visibility: hidden; }
</style>
</asp:Content>
The same question has been asked and it sounds like the answer currently is No (there is no way to disable the edit of notes and files).
Duplicate:
Prevent update of note/files on disabled views
To hide this buttons you have to set properties 'FilesIndicator' and 'NotesIndicator' to False (properties belongs to Form control)
Follow up to helenira, here is a sample section (from Portal\Pages\SP\SP700000.aspx):
<px:PXGrid ID="gridInventoryItem" runat="server" DataSourceID="ds"
Width="100%" SkinID="Details" AdjustPageSize="Auto"
FilesIndicator="False" NoteIndicator="False" FastFilterID="edFindItem"
FastFilterFields="InventoryCD,Descr" SyncPosition="True">
I have created a main site and I have created many subsite under the main site.
When I am in any main page and click on the logo icon, the page redirects to the home page.
But, when I am in any subsite and click on the logo icon, the page redirects to the subsite homepage rather than the main hompage.
I would like to change the navigation URL to the root site. Let me know if I have to edit any masterpage, or is there any common page that will inherit to all the child application.
Thanks
We have 2 ways to do this.
Method 1:
From the Snippet Gallery, copy and paste the default SiteLogo code snippet into your master page into the appropriate place you want it to be displayed.
In the SiteLogo code, search for SharePoint:SPSimpleSiteLink to find the relevant opening and closing tags. Now simply change the tag names to SharePoint:SPLinkButton instead.
Then simply add the attribute NavigateUrl to this tag and set it’s value to “~sitecollection/”.
Example:
Default snippet code:
<!--MS:<SharePoint:SPSimpleSiteLink runat="server" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPSimpleSiteLink>-->
Should become this:
<!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPLinkButton>-->
Ref link
Method 2:
We are going to add custom js in the master page => our site is a publishing site
We find the site logo in the below hierarchy(in a rendered page).
<div id='DeltaSiteLogo'>
<a href='site url'>
<img src='siteIconPath.png/whatever extension'/>
</a>
</div>
So we may try the following for redirecting to the site collection/root web url on click of the logo.
// Add the following js in the '.html' design file that associates with the corresponding masterpage.
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
$("div#DeltaSiteLogo a").attr("href",_spPageContextInfo.siteAbsoluteUrl);
});
//]]>
</script>
It works.
Edit on the SharePoint Designer Master Pages > seattle.master .
Crtl F - Search for DeltaSiteLogo
DEFAULT:
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPSimpleSiteLink>
Change To This (copy & paste the script):
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPLinkButton>
I have a Sharepoint site with a Master Page that has a main content area and a sidebar content area.
In one of my pages I have the need to allow the user to edit the content of the main content area and the sidebar content area from the Edit mode.
Currently, in the HTML of one of my pages, in main content area of a page (inside <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">) i have the follow code snippet which appears to allow a HTML edit box in Edit mode.
<SharePoint:EmbeddedFormField id="wikiField" FieldName="wikiField" ControlMode="Display" runat="server" />
I have tried to replicate this inside the <asp:Content ContentPlaceHolderId="PlaceHolderSidebar" runat="server"> tag, but this simply displays the content of my main body content and does not give me the option to edit this.
When a user enters Edit mode, I need to display two rich text HTML editors, one for the main content and one for the sidebar. What HTML tags will allow me to achieve this?
I do not have access to SharePoint Designer 2013 and cannot install it for reasons I will not go into.
Thanks
Try using this:
<PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" HasInitialFocus="True" MinimumEditHeight="400px" runat="server"/>
And add a reference to this if it's not already at the top of your master.
<%# Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
You may need to activate the publishing feature for this - I can't remember if it works without it or not.
I am using a script that adds scollbars to a doc library webpart which works fine on sites using the "default.master" system master page, but once I attempt to use my custom master page it breaks the jquery and the scrollbars do not appear.
Any idea on what I can look at in my custom master page to fix this? I am using a CEWP and not directly including the jquery inside my master page.
scollbar script (just in case)
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"
type="text/javascript"></script>
<style type="text/css">
<!--
.DataGridFixedHeader { position: relative; top: expression(this.offsetParent.scrollTop);}
-->
</style>
<script type="text/javascript">
$(function(){
var $table = $("TABLE[ID^='onetidDoclibViewTbl0']",
"#MSO_ContentTable");
<!--WRAP TABLE IN SCROLL PANE-->
$table.wrap("<DIV style='OVERFLOW: auto; HEIGHT: 250px'></DIV>");
<!--FROZEN HEADER ROW-->
$("TR.ms-viewheadertr:first", $table).addClass("DataGridFixedHeader");
});
</script>
Did you check the browser console to see if the jquery is being correctly loaded? Or if there is another script error? This script seems to be fine but if you have a script error on the page before this it will never be loaded.
Has anyone gotten the current version of fancybox 2.1.4 (http://fancyapps.com/fancybox/) with jQuery 1.9.1 to work with Microsoft Office SharePoint Server (MOSS) 2007?
Seems like the out of box css/html of MOSS 2007 is interfering with the sizing and positioning calculations that fancybox/jQuery does. The end result is a tiny fancybox (130px width).
Here is a screenshot of the issue:
screenshot of issue http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-79-Images/4152.fancyboxIssueInMOSS2007.png
Here is the super simple code I am doing:
MAIN PAGE:
<%# Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<link type="text/css" rel="stylesheet" href="jquery.fancybox-2.1.4_Styles.css" />
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript" src="jquery.fancybox-2.1.4.js"></script>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
Hello from the test page!
<a id="fancyBox1" style="display: none" data-fancybox-type="iframe" href="iframeContents.aspx"></a>
<script type="text/javascript">
$(document).ready(function () {
// show fancyBox
$('#fancyBox1').fancybox().trigger('click');
});
</script>
</asp:Content>
IFRAME PAGE:
<%# Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
Hello from the iframeContents!
</asp:Content>
Thanks for any and all help!
PS-By the way, fancybox works fine in SharePoint 2010. However, I must make it work in MOSS 2007.
SOLVED!!! Thanks JFK.
Yes, the problem was the browser (IE 10 in this case) was running in quirks mode since there was no DOCTYPE present. After I added the DOCTYPE to the master page, fancybox works!
<!DOCTYPE html>
Side note: having the DOCTYPE added to the masterpage actually disrupts out of box MOSS 2007 branding. But it's ok in my case since we will be using custom branding that already does have the DOCTYPE present. I got lucky with that one. Thanks again for the help!