Tag Info

New answers tagged

0

A simple trick is use the .. to get higher in the folders: <SharePoint:CssRegistration name="../../Your.Name.Space/css/style.css" runat="server" After="corev4.css"/> This will produce a html like: <link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/../../Your.Name.Space/css/style.css?rev=XXXXXXXX"/> The browser will interpret ...


0

Okay, I finally got this to work. I'm going to post a detailed step-by-step way I did this. The problems I've been having seem to mostly be related to not understanding a lot of the terminology/locations of things. Hopefully this will help anyone else still new to everything. I opened the main site in SharePoint Designer 2013, then opened the Master Page ...


2

Ok, here's what's happening: // select ALL elements that are .block .title h2 span and loop through them $(".block .title h2 span").each(function(index) { // find the length of the text of THIS PARTICULAR element var x=$(this).text().length; // if the length of THIS PARTICULAR element is > 29 if(x > 29) { // change the ...


0

x=$(".block .title h2 span#title").text(); If you have multiple spans then var arrSpanTitles = []; $(".block .title h2 span").each(function(){ arrSpanTitles.push($(this).text()); }); arrSpanTitle will contain all span titles


3

A ductape patch is adding a negative margin-top <div style="margin-top:-200px"> YOUR CONTENT </div>


2

Best practice is to activate the "SharePoint Server Infrastructure Publishing feature" on the site collection level and activate the "SharePoint Server Publishing feature" on the team site. Make a copy of the master page you want to use as template, give it a unique name and start branding. Never ever edit the default files of SharePoint since you may break ...


0

This is less a "SharePoint thing" and more a "JavaScript thing". If you have the counts, you can poke them into the DOM wherever you want them. All those counters are are divs or spans or lis that contain the numbers. So if you design the markup you want and style it the way you want, then you can drop the numbers into the containers with your script.


0

I am not sure what 'users open tasks' refers to but to use jquery ,any other library and css you could create a custom webpart for sharepoint or a sharepoint app with an apppart if using 2013, this allows you to leverage all CSS,HTML and any libraries you need with use of the sharepoint JSOM. Basic operations using JavaScript library code


0

You can resetting the master page for all sites within the site collection: (requires publishing feature enabled) Site Settings Master Page (under Look & Feel) Select the master page for both Site and System and check "Reset all subsites..." Save Now that all sites are using your custom master page, you can do the following to set the master page ...


0

You can use JSLink which comes with every SharePoint List. This enables you to render content using your own code. Try this post for a complete guide on JSLink and this for grouping content. Hope this helps you to start in the right direction.


0

This is more a question about HTML than SharePoint. Edit the source code of your Content Editor WebPart and put this : <style> .numbered-list { counter-reset: item } .numbered-list-item { display:block } .numbered-list-item:before { content: counters(item, ".") ". "; counter-increment: item ...


0

The Blog web parts/apps can be added to custom pages too, whether they are wiki pages or web part pages doesn't matter. Alternatively the layout can be at least partly changed on each page (with a 'Blog'-layout) part of Posts list. You could e.g. replace the default LHS web part area with your default navigation by replacing the whole <asp:Content ...


0

You can always make a copy of the default page layout and edit in designer. You can then create pages from that layout.


0

As the others have mentioned this issue depends on where the Css is stored and how it is referenced. You mention in the comments to @EricAlxander that the Css file is stored on the server itself. I'm presuming you are deploying it in the Layouts folder. This is fine. The issue probably lies in how you reference your custom Css file. I'm guessing you are ...


7

If you have deployed the CSS file to the Style Library or an Assets library, make sure it is checked in as a major version and approved. It could be possible that your page layout is not published and approved as well. This is the typical symptom when an asset is not approved, it works fine for admins but not general users.


2

You can put the code of loading external css file in JS only. Give it a try for below code: var cssId = 'myCss'; // you could encode the css path itself to generate id.. if (!document.getElementById(cssId)) { var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.id = cssId; link.rel = ...


0

you have to activate the theme on the destination site. if you enable it just in dev it will not work in prod. the themed folder is created on-the-fly and the references added to the master page at that same moment. if you want to use images on your solution, I would recommend having copies of your own


0

option a) JQuery+CSS /*hide all*/ div[id*="_WebTreeViewV4"] > table { display:none; } $(document).ready(function(){ $('div[id*="_WebTreeViewV4"]').find("a:contains('HR')").closest("table").show(); }); option b) 100% CSS - subject to change /*hide all*/ div[id*="_WebTreeViewV4"] > table { display:none; } /*use the index of the ...


0

You need to enable publishing features on the site collection (SP_Site) and on the web (SP_Web) and set the alternate CSS URL to your css-file. Find "Site Collection Features" setting and enable all features with name "publishing" in it. Find "Manage Site Features" setting and enable all feature with name "publishing" in it. Find "Master Page" ...


4

Here’s the code you should put on your pages: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="http://path to the script/StickyHeaders_v2.9BETA.js"></script> You can download StickyHeaders_v2.9BETA.js from here


1

You need to escape periods in your IDs. So your code would be something like this. #Ribbon\.EditingTools\.CPInsert.ms-cui-tabBody { height:78px!important; background-color:green; }


1

Considering you are not interested in the whole document library VS mapped folder discussion, I believe that the main reason for placing branding elements (aka CSS) in the "Styles" mapped folder, instead of the parent, "Layouts" is mainly when you want to use the Themable engine. Whether you want to host your resources in a site or directly reference them ...


0

The answer, as always, is it depends. The first thing to consider is scope. Where are these files going to be used? If they are going to be used farm-wide then it makes most sense to deploy them to the _layouts folder. If they need to be visible at the site collection level then style library or site assets makes sense. You also need to consider whether ...


0

To me, it depends on what you are doing. If you are deploying a branding feature, then I would deploy it to the file system. This way you don't have hundreds of copies of your CSS and JS files lingering around. One place, easier to update should changes be necessary. If the feature is site or site collection scoped, than I tend to do the style library or an ...


5

I guess you could always use a site collection token in your URL. ~sitecollection URLs and tokens in SharePoint 2013 If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint Update Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to ...


2

If you use file system then during system backup those files will not get backed up. This is the same case with system migration. All files in file system needs to be moved separately. On the other hand if you use libraries then those files will be placed in the content database and will be included in backup as well as system upgrade etc. If you place ...



Top 50 recent answers are included