How to load CSS and Javascript in Kentico

Kentico offers out of the box different web parts to help developers but also content editors to load JS globally on site or page specific.

Handling Javascript

  1. For inline Javascript – few lines of js, otherwise not recommended
Use Javascript Web Part

  1. Kentico Javascript Application – don't need any extra libraries or modularization. All you need to do is write a simple JavaScript snippet to make it run. They are stored on disk at: CMSScripts/Custom/
Use Javascript Web Part. For better performance, set 'Linked file page location' to 'Startup script'.
  1. Refer Javascript files from disk

<script src="~/CMSPages/GetResource.ashx?scriptfile=/{% CurrentSiteName %}/Scripts/Bundle.js"></script>

->  leverage on Kentico’s minification, server caching, macro resolving etc.

  1. Use Linked Javascript web part -> ‘GetResource.ashx’ handler is used automatically and you can leverage the above described advantages. Moreover, it actually places the code at the very bottom of your page which is good for page content loading.


Handling CSS 

CSS Stylesheet application

For CSS on the other hand, Kentico comes with a built in CSS stylesheet application that allows you not only to store the CSS code but also, to edit it inline.

Here you can include multiple CSS stylesheets into a main stylesheet. By writing CSS comments, Kentico creates a navigation list that helps you access different CSS sections.

Refer CSS files from disk 

In your Kentico project, there is a folder named after your site’s code. This is where you need to store your CSS files. Just create a subfolder called Stylesheets, for example, and you are ready to store your CSS code inside that folder.
The last step is to include your resulting bundle file in your Kentico Site.
Let’s say your Site’s CodeName is “YourSite” and your bundle CSS file is called “Styles.css”. Go to the Page application, select the Master page tab and include this code snippet

'<link href="~/CMSPages/GetResource.ashx?stylesheetfile=/{% CurrentSiteName %}/Stylesheets/Styles.css" type="text/css" rel="stylesheet" />'

to the head section, as in the following image:

watch, soccer, nfl football,ncss, nba, boxing, golf, rugby, tennis, movies, tv shows, racing, awards, cricket, basketball, motorsports, ufc, mma, wwe, live, Streaming, Online, TV Channel, find out how to to watch sports and other events live online instantly.
7/4/2020 11:36:00 PM

Live Sports For You
watch, soccer, nfl football,ncss, nba, boxing, golf, rugby, tennis, movies, tv shows, racing, awards, cricket, basketball, motorsports, ufc, mma, wwe, live, Streaming, Online, TV Channel, find out how to to watch sports and other events live.
7/4/2020 11:33:48 PM

Bangalore Escorts
Welcome to the Midnight Partner - Bangalore escort service, a popular service provider of escorts in Bangalore, for professional.
7/4/2020 4:25:00 PM

Super Rugby Aotearoa live stream
Super Rugby Aotearoa 2020 Who is one of the Most Popular Sporting Events of the New Zealand as its first events after the COVID-19 which to be played with Fans so Most of the rugby Fans of New Zealand, United States, as well as World fans, are Watch these Mega events of 2020 Super Rugby Aotearoa live stream. For the Popularity of the Events So many Broadcaster Bids for Grabbing the 2020 Super Rugby Aotearoa Official Broadcasting Rights.
7/4/2020 12:15:33 PM

I believe this is one of the most significant info
for me. And i'm glad reading your article. However want to commentary on few basic issues, The web site taste is perfect,
the articles is really great : D. Just right activity, cheers
7/3/2020 8:24:31 AM

Formula Uno 2020 in diretta streaming
D’altra parte, il sito ufficiale di streaming trasmetterà in diretta il <a href="">Formula Uno 2020 in diretta streaming</a>. Quindi, dovresti connetterti sempre al canale ufficiale. Perché il canale ufficiale ti darà l’accesso per guardare l’evento. Se ci sono molti problemi a connettersi con il canale ufficiale, è possibile abbonarsi al canale, in modo da poter accedere utilizzando il cavo sempre e ovunque.
7/3/2020 3:25:56 AM

Sweet blog! I found it while searching on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Many thanks
7/2/2020 2:57:19 PM
The office is one of the best tools to work with. This is easy and yet the most powerful productivity tool that can turn your productivity problems to dust within no time. Many offices and businesses are regular customers for the Microsoft Office Productivity tool.
7/2/2020 11:40:01 AM

Tenet (2020) Full Movie Online
Watch Tenet (2020) Full Movie Online Free Download. Tenet is an upcoming spy film written and directed by Christopher Nolan
7/2/2020 10:54:55 AM

Digital Neha
Nice blog. I loved to read your blogs. It was a very informative blog I must say. You shared such quality key points with us. Thank you for sharing.
7/2/2020 7:04:11 AM

7/2/2020 6:14:30 AM

Watch The Cleveland Browns Live
With the help of progressively current developments, it has ended up being very easy to acknowledge Cleveland Browns Football 2020 on any contraptions. Fans can watch Cleveland Browns Football 2020 Live stream online on their Ipad, Mac, Pc, PC, or any Android contraption. They can watch and check out the investigations at whatever point, any place, wherever on the planet. In this way, you can enjoy your favorite <a href="">Watch The Cleveland Browns Live</a>. We intended to offer the most raised characteristics live streaming organizations at the best expenses. Fans simply need to pay a little mean value for the Cleveland Browns Football 2020 live streaming exercises. The best part is you get access to Cleveland Browns Football 2020, so you’ll be watching and following your favored gathering or competition all through the entire Event. There are various kinds of channels where you can enjoy Cleveland Browns Football 2020 Live Online. Some of this are NFL Game Pass, NFL RedZone, NFL Network online, WatchESPN, NBC Sports,Fox Sports Go, CBS All Access, Hulu, DirecTV, FuboTV, Sling TV and so on Let’s know about these channels
7/1/2020 3:26:55 PM

MLS is Back USA TV rights
MLS is back top tier american football
7/1/2020 6:35:47 AM

ufc 251 live
ufc 251 fight between usman vs burns
7/1/2020 6:34:19 AM

install office with product key
The Office is the prominent software program used in business, home, school works, and in many sectors.
7/1/2020 5:34:06 AM
Mcafee is across the board security supplier for your regular registering needs.
7/1/2020 5:33:05 AM

Agen Guardrail Surabaya
7/1/2020 2:22:00 AM
To activate the Microsoft Office, you are required to enter the product key. You will get the product key on the basis of your Office version. In case you have purchased a retail office setup , then the activation key will be available inside the package. On the other side, the key will be sent to your registered email address if you brought an online version through office . Here is the full breakdown of how the client can activate the Office on the desired system.
6/30/2020 9:51:44 AM

Connect Brother hl-l2390dw Printer To Wifi
I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one
6/30/2020 6:05:34 AM

Epson Scanner V600 Setup
I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one
6/30/2020 6:03:44 AM

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.
6/29/2020 6:09:55 PM

If you are going for best contents like I do, only pay a visit this web site every day because
it presents feature contents, thanks
6/29/2020 12:12:50 PM

Aol Error Code 550
Its really wonderful and watchable. I like to share it with all my friends and I am sure they will like it.
6/29/2020 10:07:49 AM

how to watch Reds v Brumbies rugby
Today learning is completely dependent on the Internet. Starting from asking doubts it includes writing papers, video study, audio study etc. Internet became an unavoidable tool in education
6/28/2020 2:05:19 PM

Poirier vs Hooker Live
The Ultimate Fighting Championship (UFC) will return to the UFC Apex in Las Vegas, US, on Saturday (5 PM PDT) with UFC on ESPN: Dustin Poirier vs Dan Hooker.
6/27/2020 5:25:20 PM

<a href="">AT&T helpline number USA</a>
<a href="">AT&T Technical Support Number</a>
<a href="">AT&T email is not working</a>
<a href="">AT&T Customer Service USA</a>
<a href="">AT&T Customer Support USA</a>
<a href="">AT&T helpline number USA</a>
6/27/2020 3:39:39 PM

maria mathios
Thanks for sharing the awesome content with us. For the Activation key of Roadrunner visit:
6/27/2020 8:10:54 AM
Xfinity is an official link that helps the user to register new users with it. Save on XFINITY Digital Cable TV, High-Speed Internet, and Home Phone Services. Enjoy entertainment your way with great deals on XFINITY by Comcast. visit this site for more pieces of information CLICK HERE:-
6/27/2020 3:55:52 AM
The present digital world is filled with threats. If you are an optimist and have total faith in your device’s first-party antivirus, then it’s great but fighting against advanced malware and viruses requires modern technology. Thus, it is suggested to install McAfee on your device through McAfee will not only provide a strong security to your device, but it was also going to inform you about all the unwanted websites or links trying to invade your device.
6/26/2020 7:04:51 AM
Login to Microsoft 365 account and enter the product key at office com setup page on the relevant field. Use your Microsoft account for everything you work on office products. Being a prominent software program in the work field, Microsoft offers many apps for Windows, Mac, tablets, and phones.
6/26/2020 7:03:31 AM

Rebels Brumbies stream free
Rugby Australia has revealed the full fixture for the new Super Rugby AU competition, starting on July 3.
6/25/2020 11:00:11 AM
The activation key of MS Office is 25 alphanumeric characters code. It activates Office product software. You can get the key from the online portal as well as the offline store. To get the license online, purchase a brand-new copy of Office setup with the activation key.
6/25/2020 9:56:50 AM