Area Layout being wrapped in erroneous row?
Permalink
I've been struggling to get concrete 5.7.5.5 to generate the correct HTML. I'm getting this HTML:
I want to get this:
I can't figure out why the erroneous row is being added. If I remove enableGridContainer() from the theme, it removes the erroneous row, but also removes the container.
Has anybody else seen this and know a fix?
<div class="container"> <div class="row"> <div class="12u"> <div class="row"> <div class="4u">...</div> <div class="4u">...</div> <div class="4u">...</div> </div> </div> </div> </div>
I want to get this:
<div class="container"> <div class="row"> <div class="4u">...</div> <div class="4u">...</div> <div class="4u">...</div> </div> </div>
I can't figure out why the erroneous row is being added. If I remove enableGridContainer() from the theme, it removes the erroneous row, but also removes the container.
Has anybody else seen this and know a fix?
Hi bram1028,
Please include your grid framework PHP class code as an attachment or in a reply.
Please include your grid framework PHP class code as an attachment or in a reply.
Here's my GridFramework, but the problem exists with the built-in frameworks as well.
<?php namespace Concrete\Package\Roney\Src; use Concrete\Core\Page\Theme\GridFramework\GridFramework; defined('C5_EXECUTE') or die(_("Access Denied.")); class RoneyGridFramework extends GridFramework { public function getPageThemeGridFrameworkName() { return t('Roney'); } public function getPageThemeGridFrameworkRowStartHTML() { return '<div class="row">'; } public function getPageThemeGridFrameworkRowEndHTML()
Viewing 15 lines of 71 lines. View entire code block.
@bram1028
What are the steps to recreate your first example?
What are the steps to recreate your first example?
You can recreate this by signing up for a trial SimpleSite using Elemental theme.
Create a new Blank page. Add a Area Layout to the Main Area with 2 columns using Bootstrap grid.
The generated code is this:
http://test4.y0xx.cloud.concrete5.io/test...
Create a new Blank page. Add a Area Layout to the Main Area with 2 columns using Bootstrap grid.
The generated code is this:
http://test4.y0xx.cloud.concrete5.io/test...
<div class="container”> <div class="row”> <!-- This row (and column) is unnecessary --> <div class="col-sm-12”> <div class="row”> <div class="col-sm-6”> <p>Column 1</p> </div> <div class="col-sm-6"> <p>Column 2</p> </div> </div> </div> </div> </div>
@bram1028
I understand what you are describing and am not sure why it is there.
Maybe someone else will have some information on the topic.
In the meantime, I and maybe others, can look at the code for how the columns are added.
I understand what you are describing and am not sure why it is there.
Maybe someone else will have some information on the topic.
In the meantime, I and maybe others, can look at the code for how the columns are added.
I just found where it's coming from.
concrete/elements/block_header_view.php:36
concrete/elements/block_footer_view.php:22
I commented out the indicated lines and the problem is fixed. I just need to do some regression testing to make sure it doesn't break anything else.
I think I will report this on Github. It should only be adding the container, not a row/column.
concrete/elements/block_header_view.php:36
$gf = $pt->getThemeGridFrameworkObject(); print $gf->getPageThemeGridFrameworkContainerStartHTML(); //print $gf->getPageThemeGridFrameworkRowStartHTML(); //printf('<div class="%s">', $gf->getPageThemeGridFrameworkColumnClassesForSpan( // min($a->getAreaGridMaximumColumns(), $gf->getPageThemeGridFrameworkNumColumns()) //));
concrete/elements/block_footer_view.php:22
$gf = $pt->getThemeGridFrameworkObject(); //print '</div>'; //print $gf->getPageThemeGridFrameworkRowEndHTML(); print $gf->getPageThemeGridFrameworkContainerEndHTML();
I commented out the indicated lines and the problem is fixed. I just need to do some regression testing to make sure it doesn't break anything else.
I think I will report this on Github. It should only be adding the container, not a row/column.
I found this closed issue in Github:https://github.com/concrete5/concrete5/issues/1328...
I still believe this behavior is wrong. The container should be added, but now the row.
I still believe this behavior is wrong. The container should be added, but now the row.
I guess this is either by design or a bug.