Solved

JS, jQuery and Template

  • 1 June 2020
  • 1 reply
  • 171 views

Userlevel 2
Badge +2

Hello

We link to our ClickLearn content from Wiki pages on a SharePoint site - we don’t use the shelf/book system for the end user at this time, however it will be a handy feature for the training and development team to keep items organized.

So, if the user ends up on the recording page from a SharePoint wiki link, essentially it will hide a couple elements - the breadcrumb trail, and the page navigation (forward/back) on the sides of the page.  This will stop them from navigating through the book.

However if someone on the development side is navigating the book, I don’t want those items to be hidden. I can handle the jQuery and Javascript to achieve this, what I am wondering is the right place in the template to put the following items.  I can tell its going to be in the HTML/GlobalScript(JS or CSS) portion of the template, but which one?

  1. If I’m loading my own JS library, should which template should it appear in (Recording vs Book vs Shelf)?
  2. Same for jQuery libraries - at which level of the template should they be placed.
  3. When placing my own CSS or JS calls in these sections, is it important to copy and paste the default item into the field?  (The code in the Language Independant field)?  I don’t want to override any of your JS or CSS.

Thanks

-Kevan

icon

Best answer by Morten 10 June 2020, 22:28

View original

1 reply

Userlevel 6
Badge

Hello

We link to our ClickLearn content from Wiki pages on a SharePoint site - we don’t use the shelf/book system for the end user at this time, however it will be a handy feature for the training and development team to keep items organized.

So, if the user ends up on the recording page from a SharePoint wiki link, essentially it will hide a couple elements - the breadcrumb trail, and the page navigation (forward/back) on the sides of the page.  This will stop them from navigating through the book.

However if someone on the development side is navigating the book, I don’t want those items to be hidden. I can handle the jQuery and Javascript to achieve this, what I am wondering is the right place in the template to put the following items.  I can tell its going to be in the HTML/GlobalScript(JS or CSS) portion of the template, but which one?

  1. If I’m loading my own JS library, should which template should it appear in (Recording vs Book vs Shelf)?
  2. Same for jQuery libraries - at which level of the template should they be placed.
  3. When placing my own CSS or JS calls in these sections, is it important to copy and paste the default item into the field?  (The code in the Language Independant field)?  I don’t want to override any of your JS or CSS.

Thanks

-Kevan

 

Hi Kevan,

 

You can add the script here, for recording, book, and shelf respectively - depending on your requirements.

 

HTML / GLOBALSCRIPTJS

 

Book template

Unless you wish to use different script for each language, i would recommend you use the language independant field.

Reply