SharePoint custom fonts and styles

SharePoint is also considered as a Web CMS. Whether it is a Content Editor Webpart, a Rich HTML Field or a Publishing page the Ribbon offers formatting and design capabilities, which looks like all Office Products.

 

To make the redaction of articles easy and standard(in case of a corporate design) we can add both custom fonts and text styles to the ribbon elements, such Headlines, HR News…etc

Fonts

We can add more fonts, which are either based on standard ones, or on custom fonts that you purchase. And it is very easy within SharePoint. You should just add some special classes to your loaded CSS.

You should just add a class definition named “ms-rteFontFace-XXX”, where XXX is a random ID.

.ms-rteFontFace-132{
-ms-name:”Gotham Book”;
font-family:”Gotham Book”;
font-size:13px;
}

This will add a new Font “Gotham Book”.

PS: the font files should be loaded using “@font-face”

@font-face {
font-family: ‘Gotham Book’;
src: url(‘path/GothamBook.ttf’) format(‘truetype’);
}

 

Styles

We can add preconfigured text styles, and here we will add a Headline with the font Gathoma Light, red color and with 30px size.

.ms-rteStyle-CustomHeadLines{
-ms-name:”CustomHeadLines”;
font-weight:300;
font-family:’Gotham Light’;
font-style:normal;
color : red;
font-size: 30px;
}

Advertisements

Hyper-V Copy VM : blinking point on boot

Today i needed another dev VM(SharePoint 2013), i wanted to copy my 2016 VM and reinstall SharePoint, without having to install sql and AD again.

I copied the vhdx and created a new VM based on it.

When i started it a black screen with a blinking point comes

 

Solution :

I figured out that to be able to copy vhdx you will start thenew one with Generation2(thirs step when you configure your new VM)

 

 

SharePoint foundation 2013 Offline Installation

I was trying today to install SharePoint foundation 2013. The Prerequisites Installer could not download the dependencies, i did not search why and i wanted to perform an offline installation.

Solution :

  1. Download all the prerequisites.
  2. Extract the sharepoint installer : sharepoint.exe /extract:”C:\SharePoint2013\prerequisiteinstallerfiles”
  3. Copy the downloaded prerequisites to “C:\SharePoint2013\”
  4. Run again the prerequisiteinstaller.

 

Microsoft .NET Framework 4.5

(Full Stand alone package)

http://go.microsoft.com/fwlink/?LinkId=225702
Windows Management Framework 3.0 http://www.microsoft.com/en-us/download/details.aspx?id=34595
Microsoft SQL Server 2008 R2 SP1 Native Client http://www.microsoft.com/en-us/download/details.aspx?id=26728
Windows Identity Foundation (KB974405) http://go.microsoft.com/fwlink/p/?LinkID=226830
Windows Identity Extensions http://go.microsoft.com/fwlink/?LinkID=252368
Microsoft Sync Framework Runtime v1.0 SP1 (x64) http://go.microsoft.com/fwlink/p/?LinkID=224449
Windows Server AppFabric http://go.microsoft.com/fwlink/?LinkId=235496

 

 

Microsoft Information Protection and Control Client http://go.microsoft.com/fwlink/p/?LinkID=219568
Microsoft WCF Data Services 5.0 http://www.microsoft.com/en-us/download/details.aspx?id=29306
Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763  

http://www.microsoft.com/en-us/download/details.aspx?id=29241

 

 

SharePoint 2013 Foundation Installation : This product requires Microsoft .Net Framework 4.5

I was trying to install SharePoint 2013 Foundaiton on a Windows Server 2012 R2. Microsoft says that only a SP1 pack is installable on a Windows Server 2012 R2.

I run the prerequisites and installed the dependencies offline including .Net Framework 4.5.

Problem :

When i start the installation i get this error :

This product requires Microsoft .Net Framework 4.5

It was very weird because when i try to add the .Net Framework 4.5 Feature, The Server Manager shows that it is already installed.

 

 

 

 

 

 

 

 

 

 

 

 

Solution :

My first thought was : maybe i am missing some updates. I checked The Microsoft Updates center and everything was up-to-date… and that is the Problem, Sharepoint 2013 is since 2013, and having a very up-to-date Server could cause issues.

I checked the .Net Framework Version :

 Set-Location 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client'
 Get-ItemProperty -Path . | Select-Object Version

And i found that the 4.7 version was installed. To Uninstall it i had to uninstall the Update KB3186539 .

Open the Windows Update Center and search for this KB.

Be carefull : The KB depends on which version of .Net framework you found, search for “The .NET Framework XX.XX offline installer for Windows” and you will find which KB is related to it and just uninstall it.

SharePoint does not overwrite documents with the same name, he creates a new one!

I always thought that SharePoint overwrites files with the same name(of course when you check this checkbox).

Unfortunately it is not the case, SharePoint does not “overwrites” it, he deletes the documents and creates a new one while keeping the name.

Who says a new item, says a new ID….The problem is if you have an application who is based on the document’s IDs…

The solution is to change your code and use the document URL(FileLeafRef Property) instead of the ID.

 

SandBox solution : provision publishing page with custom web parts

 

In my last article i talked about provisioning publishing pages with a module on sandboxed solutions.

Today i will talk about adding custom WebParts to a provisioned publishing page.

On farm solutions we need only type of the WebPart and the import error message. But on sandbox we need to specify the id of the solution that deployed the WebPart :

sandboxWP

 

 

 

 

 

You can find the solution ID on the manifest file of the package.