Cleaning my html from messy code
Permalink
Hello Everyone!
I'm building my first website on concrete5, so I've got few questions.
First at all:
I'm putting content on my page mostly by html blocks, however, concrete embeeds me my content with
Is it possible to turn this feature off? I don't care how it looks in edit mode, but it's very important to get rid of this tags in "normal" mode.
My second question is about adding some css/js in normal mode.
I know, that concrete needs some js/css files in custom mode, but imho there's absolutely no reason to adding some styles/js files on each request. Can I turn this off?(I mean: to add this files only in edit mode)
Regards,
Michal.
I'm building my first website on concrete5, so I've got few questions.
First at all:
I'm putting content on my page mostly by html blocks, however, concrete embeeds me my content with
<div id="htmlblock(id)" class="htmlblock"> </div>
Is it possible to turn this feature off? I don't care how it looks in edit mode, but it's very important to get rid of this tags in "normal" mode.
My second question is about adding some css/js in normal mode.
I know, that concrete needs some js/css files in custom mode, but imho there's absolutely no reason to adding some styles/js files on each request. Can I turn this off?(I mean: to add this files only in edit mode)
Regards,
Michal.
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Foo bar :: Home</title> <meta name="description" content="" /> <meta name="generator" content="concrete5 - 5.4.1" /> <script type="text/javascript"> var CCM_DISPATCHER_FILENAME = '/nowa/index.php'; var CCM_CID = 1; var CCM_EDIT_MODE = false; var CCM_ARRANGE_MODE = false; var CCM_IMAGE_PATH = "/nowa/concrete/images"; var CCM_TOOLS_PATH = "/nowa/index.php/tools/required"; var CCM_REL = "/nowa"; </script> <link rel="stylesheet" type="text/css" href="/nowa/concrete/css/ccm.base.css?v=084ba3cd05d47fa07c4ca3b2b37ad519" /> <script type="text/javascript" src="/nowa/concrete/js/jquery.js?v=084ba3cd05d47fa07c4ca3b2b37ad519"></script>
Viewing 15 lines of 16 lines. View entire code block.
that's what c5 includes in 'normal' mode...
I'll try to copy that file, so thanks for reply ;)
How is that messy? its 3 files, and that javascript code block is needed
well... I follow KISS rule - imho it's not needed in normal mode, and it breaks my pure,clean code ;)
Is there any way to bypass that behaviour?
I'm thinking of sth. like in my template:
Is there any way to bypass that behaviour?
I'm thinking of sth. like in my template:
<?php if(user_is_logged_and_page_is_in_edit_mode() ){ //include that code } else{ //leave it pure ;) } ?>
except some of that code is needed for blocks... you really shouldn't bother with it man, it doesn't hurt anything, or even slow anything down, (ok maybe .001 ms)
Well, I don't think about it as performance issue. I REALLY like clean code and I will hack c5 core to change it - if I'm unable to change it in other way ;)
im saying that you don't want to change it as its used a lot, even when the user isn't logged in.
if you really want to edit/remove it copy /concrete/elements/header_required.php to /elements.
but dude thats really overkill, as its 1 code block that isn't messy at all...
if you really want to edit/remove it copy /concrete/elements/header_required.php to /elements.
but dude thats really overkill, as its 1 code block that isn't messy at all...
I understand your desire for clean code as well. What I've learned, though, is that using CMS'es is an exercise in compromise. You're losing some measure of control over the output of your html in exchange for a lot of free "out-of-the-box" functionality that you don't have to code yourself. There's not really any way around it. And if it makes you feel any better, concrete5 is actually much cleaner than most of the other CMS'es out there.
Perhaps it might help to flip your definition of "Simple" from "the simplest code" to "the simplest development process for me" ?
Perhaps it might help to flip your definition of "Simple" from "the simplest code" to "the simplest development process for me" ?
What css/js? concrete5 only includes like 3 files when not in edit mode by default (not including theme files)