KTL Setup - How to disable features #51
cortexrd
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
Hey Norm, I like having the ability to show my version info on some of my pages but would like the ability to select what pages this info is not shown on? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you... JON |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Disabling KTL Features
Let's say you've just installed the KTL with the 5 lines of the Loader. You've experimented a bit with all the basic features, but now, you want to change the default behavior and adapt the KTL to your needs. Typically, you realize that some features are not desirable and you want to turn them off.
Here's how to do it.
You need to copy the content of this file to your Builder's Javascript pane, just below the Loader:
https://github.com/cortexrd/Knack-Toolkit-Library/blob/master/KTL_Customization.js
The KTL_Customization.js file is actually a very close copy of its big sister:
https://github.com/cortexrd/Knack-Toolkit-Library/blob/master/KTL_Defaults.js
It can be seen as a small "template" copy has just a few flags to get you started.
Note: all flags can be removed without problem if you want to keep your code as small as possible. In that case, they will be initialized with the defaults as set in the KTL_Defaults.js file.
This code below has been stripped-of most of its code, and would still be perfectly valid and functional.
If you want to disable a feature the flag must exists and set its value to false.
Examples:
Beta Was this translation helpful? Give feedback.
All reactions