Creating blocks: js + css load without calling them?

Permalink
I created a block with css and js directories and then stuck some css and js files in there. The block is immediately calling the files and affecting the page render without even a callback function in the controller.php. I changed the name of the files to "zzyxx.css" and "zzyxx.js" to make sure they weren't being auto-called simply for having a name like 'view.css' or 'auto.js' that might automatically get loaded by Concrete5.

Is this supposed to happen? I am just learning, but I thought that was the whole point of the on_page_view() function.

--------

UPDATE: whelp, I'm going to go out on a limb and guess that Concrete5 has built in logic that says "anything you put in CSS or JS directories within your blocks, C5 is going to go ahead and automatically spit them out in the header and footer for you." .... right?

 
pvernaglia replied on at Permalink Best Answer Reply
pvernaglia
You are correct sir, those files in a block's js or css folders get loaded automatically
zoinks replied on at Permalink Reply
I guess that's a good thing. I can't see any reason why it would be good to keep the option to not have them load unless called. If you don't want them called, don't put them in the block directory, right?