What does Loader::element('footer_required'); do

Permalink 2 users found helpful
I'm in footer.php and removed the line of code Loader::element('footer_required');

I'm not stupid but what is it's function?

I know the header one provides the C5 edit bar but the footer well I'm not too sure

View Replies:
bcarone replied on at Permalink Reply
it makes sure that all the pages throughout c5 gets your footer.php file.

nothing cosmic. I have a few folks asking me about these, and it is simply a required thing. It has a simple purpose as the name implies. The folks asking me are mainly designers or non-tech folk that are looking at files. So with the usage of MVC, footer.php is required throughout the site and this ensures your footer data gets to the bottom of each page.

It's obvious your not stupid, your using C5.
kappi replied on at Permalink Reply
Thanks for the reply, so it's a c5 alternative to a good old fashioned php footer include

thanks again
12345j replied on at Permalink Reply
I thought it loaded the google analytics code if you use that, but im not sure.
Mnkras replied on at Permalink Reply
currently all it does is echo the tracking code from the dashboard,
ThemeGuru replied on at Permalink Reply
Which is also needed for Tony's Stats app.
dwaynecrooks replied on at Permalink Reply
loads a file in the elements/ directory and concrete/elements/ directory. So,
simply loads the file 'concrete/elements/footer_required.php' since on a fresh install of Concrete5 the elements/ directory is empty. As of v5.6.1.2 the contents of that file is

$_trackingCodePosition = Config::get('SITE_TRACKING_CODE_POSITION');
if (empty($disableTrackingCode) && (empty($_trackingCodePosition) || $_trackingCodePosition === 'bottom')) {
   echo Config::get('SITE_TRACKING_CODE');
print $this->controller->outputFooterItems();
lackadaize replied on at Permalink Reply
if I have no elements/footer_required.php should I still have the Loader::element(footer_required) in my footer? I'm having trouble with GA as follows:

I've tried installing google analytics in a number of ways

I've done it through the dashboard > Tracking Codes, but when I go to save it the entry disappears. If I inspect the document I end up seeing the ga.js entry in the <body> but after waiting a significant amount of time it still doesn't show up in GA.

I also tried inserting the snippet before </header>, before </body>, and before </footer> and again I can see the entry, but after waiting good amount of time I couldn't see the entry in GA.

<?php Loader::element('footer_required'); ?> is present in 'footer.php' and I believe that's where the C5 dashboard entry goes. I've also cleared the cache as per usual.

Do you have any thoughts on what might be going on?
lackadaize replied on at Permalink Reply
nevermind. it turned out miser was interfering with GA. I added define('MISER_ENABLE',''); to config/site.php and it resolved the issue I was having.