Design options on global areas
Permalink
Do the design options not apply when set on blocks in global areas? We have two identical blocks with margin and padding applied in the block's 'design' options. The CSS is applied on the blocks in areas but not in global areas.
I think this is to do with how blocks get rendered to pages. So the design will actually get applied in the page it 'lives' on but not where it is represented. Templates do work so you could do like
for the template's view.php and add your changes in view.css as a workaround / hack.
I'm not sure if this has made it to the list of suggested improvements but it seems like you're describing the expected behavior for a block in a global area to me.
<div id="custom_design"> <!--the entire view.php --> </div>
for the template's view.php and add your changes in view.css as a workaround / hack.
I'm not sure if this has made it to the list of suggested improvements but it seems like you're describing the expected behavior for a block in a global area to me.
I think this was fixed in git, not 100% sure.
Thanks Guys. I checked github and could not see anything post 5.5.1
I've just had a hack about with models/collection.php
This seems to fix the problem, and we can see no side effects anywhere else.
From line 409, see the two commented out lines and the lines that immediately follow them. Can anyone see any issues with doing it this way?
I've just had a hack about with models/collection.php
This seems to fix the problem, and we can see no side effects anywhere else.
From line 409, see the two commented out lines and the lines that immediately follow them. Can anyone see any issues with doing it this way?
// grab all the header block style rules for items in global areas on this page $rs = $db->GetCol('select arHandle from Areas where arIsGlobal = 1 and cID = ?', array($this->getCollectionID())); if (count($rs) > 0) { $pcp = new Permissions($this); foreach($rs as $garHandle) { if ($pcp->canReadVersions()) { $s = Stack::getByName($garHandle, 'RECENT'); } else { $s = Stack::getByName($garHandle, 'ACTIVE'); } if (is_object($s)) { //$rs1 = $db->GetAll('select bID, csrID from CollectionVersionBlockStyles where cID = ? and cvID = ? and csrID > 0', array($s->getCollectionID(), $s->getVersionID())); $rs1 = $db->GetAll('select bID, arHandle, csrID from CollectionVersionBlockStyles where cID = ? and cvID = ? and csrID > 0', array($s->getCollectionID(), $s->getVersionID())); foreach($rs1 as $r) { $csrID = $r['csrID'];
Viewing 15 lines of 27 lines. View entire code block.
Just following up on this. If the above code amend fixes it - is this a bug I should submit a bug report for?
never hurts to submit a bug to the bug tracker. lots of tools in there to help validate the thing.
git log --grep='Global'
looks like
https://github.com/concrete5/concrete5/commit/63f7dec701099be026372d...
may be what @mnkras is talking about. Not sure if it fixed it or whatevs. But that's the only one that seems to talk about CSS and Global Areas.
Looks like this has something to do with the way that blocks are rendered in globalAreas. I added a 2 px dotted border to an image block to check it out, and the border shows up on the stacks dashboard page, but not in its global Area.