javascript - Just adding js script to typo3 -


i have following problem. have typo3 page without template made myself, gets in way style , behavior of other pages (i mean navigation, footer , on). have written html inside page creating html element.

in html element, included js-code, uses jquery. problem is, page loads jquery @ footer , scripts loading before (in html element). script not recognize jquery. how can add scripts @ whole end of page? know, has templates, when create new template page, whole content disappears.

would nice help.

cheers,

andrej

it practice read js single file placed in footer of page. add setup section of page template:

page.includejsfooter.scripts = fileadmin/js/scripts.js 

then remove js html template , put file. file hold custom js , possibly libraries use on page (if not loading them cdn).

bonus: js doesn't have re-loaded on every page view can read cache.

for reference: https://docs.typo3.org/typo3cms/typoscriptreference/setup/page/index.html#includejsfooter-array


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -