How can I create a footer using the term store like the one on https://www.microsoft.com/en-in/. How can I include that in the Master Page so that it reflects across the site? Please help…
What version of SharePoint are you using?
To inject HTML/CSS, you are going to want to use user custom actions or a delegate control for injecting it into the masterpage.
If using modern only, you can use SPFx Application Customizer. Let me know what version you are using, we’ll point you in the right direction.
@Shail: You can use SharePoint Framework Extensions (Application Customizer) to customize the master page for Office 365.
This will help you to start with :
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/overview-extensions
If you are new to SPFx (SharePoint Framework) – read the basics from : https://tinyurl.com/y7pc87x8
best practice would be to avoid modifying the master page. You should use a custom action to inject your js into the pages.
if you have already modified the master page, your approach would work fine.
Sahil,
You could refer the script directly inside the master page or also you can add a webpart(content editor) inside master page that would call your js.
@Beau: Thanks for replying.
I am using Office 365(Sharepoint Online)..Can i include a content placeholder in the custom masterpage and reference the .js file in the masterpage. The .js file would include the script to fetch the terms from the termset. Then render the contents inside the div in the contentplaceholder.
Hi Shail, as mentioned I would avoid modifying the masterpage. The best approach is to use a user custom action that contains your JS, and it will inject it into the masterpage. Doing a quick google search, you should find what you are looking for.
best practice would be to avoid modifying the master page. You should use a custom action to inject your js into the pages.
if you have already modified the master page, your approach would work fine.
The script works fine for Home and site settings classic pages but doesn’t execute on site contents and “Add an app” classic pages. Any reason why the javascript isn’t executing on these pages?