Where to add external sources (Javascripts)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
caigner
Forum Members
Forum Members
Posts: 46
Joined: Sun Aug 16, 2020 5:29 am

Where to add external sources (Javascripts)

Post by caigner »

I want to use Hyphenopoly in my project.

Are there recommendations (best practices) as to where to put such external sources?

Regards,
Christian
I am using CMSms 2.2.19
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Where to add external sources (Javascripts)

Post by DIGI3 »

If you mean the files, the assets folder is ideal - I usually make a 'js' folder inside it. If you mean the script tags, usually just before the closing <__body> tag. You might also want to look at CMSMSExt for {xtjs_add} and its related tags.
Not getting the answer you need? CMSMS support options
User avatar
creopard
Forum Members
Forum Members
Posts: 50
Joined: Fri Nov 10, 2017 10:25 am
Location: .de
Contact:

Re: Where to add external sources (Javascripts)

Post by creopard »

What is the advantage of this Hyphenopoly.js implementation instead of letting the browser handle hyphenation automatically with CSS like:

Code: Select all

hyphens:auto;
hyphenate-limit-chars:auto 5;
hyphenate-limit-lines:2;
pierrepercee
Forum Members
Forum Members
Posts: 152
Joined: Thu Jan 10, 2013 8:02 am

Re: Where to add external sources (Javascripts)

Post by pierrepercee »

Hello Creopard,

You can use it with old browsers that do not support these css rules. Official sites (town halls for example) sometimes have backward compatibility requirements with very old browsers.
Post Reply

Return to “CMSMS Core”