missing "Loader::element('footer_required')" ??

Permalink 1 user found helpful
Tried creating a theme following the "'concrete-ize' a basic HTML theme in 8 minutes" tutorial (http://www.concrete5.org/documentation/how-tos/designers/make-a-theme/) and kept getting javascript error:
ccm_menuInit is not defined


Took a while to figure it out, but I added the following at the bottom of my <body>

<?php Loader::element('footer_required'); ?>


Not sure if this is the proper way to do things, but it seems to be working for me

 
adamjohnson replied on at Permalink Best Answer Reply
adamjohnson
Yup, that is correct. All themes should have that, but you will see problems editing if you don't have footer_required in C5.5 and up.
rlintern replied on at Permalink Reply
Thanks for the quick response. Too bad the first tutorial I came across about creating custom themes in the concrete5 documentation doesn't mention this necessary piece of information at all! So far I'm quite liking concrete5 but now I'm a little nervous that this documentation isn't kept up to date.
adamjohnson replied on at Permalink Reply
adamjohnson
Yeah, I've asked the core team to update that page as I am sure lots of other folks have come across the same issue.

That said, they have a lot on their plate and footer_required, while it has been around for quite some time, has not been /absolutely/ necessary until C5.5+. Everything used to be output in the head via header_required. Now, the majority of JS for edit mode is output via footer_required which speeds up your site and is a best practice.