{"id":3251,"date":"2014-06-23T21:42:54","date_gmt":"2014-06-23T21:42:54","guid":{"rendered":"http:\/\/webninjataylor.com\/library\/?p=3251"},"modified":"2017-02-13T14:34:47","modified_gmt":"2017-02-13T19:34:47","slug":"sharepoint-2013-developer-tips","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/sharepoint-2013-developer-tips\/","title":{"rendered":"SharePoint 2013 Developer Tips"},"content":{"rendered":"<h2>Tips<\/h2>\n<ul>\n<li>You can add scripts to page layouts after a snippet&#8217;s &lt;div&gt;&lt;\/div&gt;, but not within the snippet in the layout file<\/li>\n<li>Bootstrap JS files conflict with SP core; edits won&#8217;t save in browser<\/li>\n<li>HTML for SharePoint Ingestion\n<ul>\n<li>No &lt;form&gt; tags<\/li>\n<li>No &lt;style&gt; tags<\/li>\n<li>Use ms-design-css-conversion=\u201dno\u201d in the CSS &lt;link&gt; tag if using web fonts<\/li>\n<li>SP strips the \u201c&lt;!&#8211; if lt ie \u2026\u201d shims<\/li>\n<li>Use relative paths for assets<\/li>\n<li>Watchout for global tag CSS selectors<\/li>\n<\/ul>\n<\/li>\n<li>Never edit the master file SharePoint creates<\/li>\n<li><b>Delete files<\/b> under Site Settings &gt; Web Designer Galleries &gt; Master pages and page layouts<\/li>\n<li>Upload files via the files tab<\/li>\n<li>Click the ellipses to access actions<\/li>\n<li>The order of SP page construction = Master Page + Page Layout + Snippet(s)<\/li>\n<li>Need to turn Design Manager on under Site Settings &gt; Site Collection Features<\/li>\n<li>It\u2019s a good idea to namespace the CSS via a wrapping class (easiest via SASS and then just run grunt when you make changes)<\/li>\n<li>Lists are created as \u2018apps\u2019 and the advanced settings allows connection to a content type<\/li>\n<li>Wikis can be enabled if Publishing is active<\/li>\n<li>Alternate CSS is under master page settings<\/li>\n<li>You can embed JavaScript via Custom Actions without touching the master page (here&#8217;s <a href=\"https:\/\/github.com\/johnnliu\/UserCustomActionsConfigPage\">a GitHub repo with a helper page<\/a> for those of us who don&#8217;t know PowerShell) &#8230; minute 24:20 in <a href=\"https:\/\/www.youtube.com\/watch?v=2AxN-G56-d4\">Learn best practices for customizing and branding SharePoint Team Sites<\/a><\/li>\n<\/ul>\n<h2>Direct URL Paths<\/h2>\n<ul>\n<li>\n<div><strong>Change the look&#8230;\u00a0<\/strong>\/_layouts\/15\/designgallery.aspx<\/div>\n<\/li>\n<li>\n<div><strong>Import design package&#8230;\u00a0<\/strong>\/_layouts\/15\/start.aspx#\/_layouts\/15\/DesignPackageInstall.aspx<\/div>\n<\/li>\n<li>\n<div><strong>List of composed looks&#8230;\u00a0<\/strong>\/_catalogs\/design\/AllItems.aspx<\/div>\n<\/li>\n<li>\n<div><strong>List of site&#8217;s web pages&#8230;<\/strong> \/Pages\/Forms\/AllItems.aspx<\/div>\n<\/li>\n<li>\n<div><strong>Master Page files&#8230;<\/strong> \/_catalogs\/masterpage\/Forms\/AllItems.aspx<\/div>\n<\/li>\n<\/ul>\n<h2>Recommended Development Path<\/h2>\n<ol>\n<li><strong>Site<\/strong> &#8211; Create a new site<\/li>\n<li><strong>Master Page<\/strong> &#8211; Create and publish a master page with only calls to the main JS and CSS files\n<ol>\n<li>Upload and publish JS, CSS, and images<\/li>\n<\/ol>\n<\/li>\n<li><strong>Page Layout<\/strong> &#8211; Define content type (new page layout content type) and fields (name for each editable area of page)\n<ol>\n<li>Site settings &gt; Site content types \u2026 Create\n<ol>\n<li>Set parent to Publishing Content Types &gt; Page<\/li>\n<li>Assign to new group for project or project\u2019s existing group (e.g. My Project Content Types)<\/li>\n<\/ol>\n<\/li>\n<li>Add the new fields via Add from new site column (Add to their own group)<\/li>\n<li>Create and publish page layout with Content Type set to the page layout you just created\n<ol>\n<li>Customize by downloading, modifying HTML, and then uploading (remember to publish changes)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li><strong>Pages<\/strong> &#8211; Create pages using the new layout<\/li>\n<\/ol>\n<h2>Resources<\/h2>\n<ul>\n<li>\n<p class=\"p1\"><a title=\"Creating A Custom Page Layout In SharePoint 2013\" href=\"http:\/\/blog.navantis.com\/create-a-custom-page-layout-in-sharepoint-2013\/\">Creating A Custom Page Layout In SharePoint 2013<\/a><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Tips You can add scripts to page layouts after a snippet&#8217;s &lt;div&gt;&lt;\/div&gt;, but not within the snippet in the layout file Bootstrap JS files conflict with SP core; edits won&#8217;t save in browser HTML for SharePoint Ingestion No &lt;form&gt; tags No &lt;style&gt; tags Use ms-design-css-conversion=\u201dno\u201d in the CSS &lt;link&gt; tag if using web fonts SP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[40,150],"class_list":["post-3251","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-html","tag-sharepoint"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=3251"}],"version-history":[{"count":14,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3251\/revisions"}],"predecessor-version":[{"id":3567,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3251\/revisions\/3567"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=3251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=3251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=3251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}