Extra CSS and JS being added into header after adding classes and id's to blocks.
Permalink
Hello, I have a problem that I think is a bug. Whenever I add a class or id to a block concrete5 auto adds useless css and js into my header, and even adds classes to my custom javascript. It has no purpose except to aggravate me. Is their any way to disable this? I know it is useless, because the extra div with the new classes and id is added via PHP, server side. The c5 javascript also messes with my dynamically added div wrapper.
It screws up my perfectly indented xhtml! :-(
Example of stuff being uselessly added:
What is the deal with background-repeat: no-repeat;, anyways?
That is retarded.
It screws up my perfectly indented xhtml! :-(
Example of stuff being uselessly added:
<link rel="stylesheet" type="text/css" href="/concrete5/concrete/css/ccm.base.css?v=cd27c5d8b04a3890c8afaef287410485" /> <script type="text/javascript" src="/concrete5/concrete/js/ccm.base.js?v=cd27c5d8b04a3890c8afaef287410485"></script> <style type="text/css"> #this-is-a-tab-name1 {background-repeat:no-repeat; } </style>
What is the deal with background-repeat: no-repeat;, anyways?
That is retarded.
The background repeat bit is added for every block that I add an id to. That id name was a tab width test for a plugin I made for jquery to make tabs with just adding a class and an id to a block. c5 adds each id along with that stupid css into the page for no good reason.
And I think that auto adding useless css and js for no reason IS a bug. I can understand adding stuff into the page in edit mode, but doing it for the frontend is ridiculous. I've half a mind to make the header_required into a conditional statement, but that would break any other blocks with view.js/css files. I wonder if there is a way to pull the src files from any blocks directly into the theme, and bypass the c5 logic? That way I could use the latest jquery, and just swap everything for c5 files when in edit mode...
As for the HTML formatting, I was thinking of building or finding a server side parser that would add simple newlines and indentations to the html for better readability.
I think I could probably (after many hair pulling hours) figure out a straight forward (ha!) regex that would do these things in the template.
And I think that auto adding useless css and js for no reason IS a bug. I can understand adding stuff into the page in edit mode, but doing it for the frontend is ridiculous. I've half a mind to make the header_required into a conditional statement, but that would break any other blocks with view.js/css files. I wonder if there is a way to pull the src files from any blocks directly into the theme, and bypass the c5 logic? That way I could use the latest jquery, and just swap everything for c5 files when in edit mode...
As for the HTML formatting, I was thinking of building or finding a server side parser that would add simple newlines and indentations to the html for better readability.
I think I could probably (after many hair pulling hours) figure out a straight forward (ha!) regex that would do these things in the template.
In general, if you're concerned about perfectly-indented or nicely-formatted markup, you are going to be very aggravated with any CMS you use -- they all will output crazy and ugly markup, and I've found it's best to just consider the HTML that goes out to the browser as "compiled code" instead of part of the presentation.