Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When i used the bootstrap layout i cannot find the wrapper attributes for the layout.
i have worked in this patch to added it.
now you can add outer wrapper (class and id ) for display suite and panel pages.
Comment | File | Size | Author |
---|---|---|---|
#9 | refactor_module_to_be-2784265-9.patch | 229.86 KB | markhalliwell |
Comments
Comment #2
Ahmad Abbad CreditAttribution: Ahmad Abbad as a volunteer commentedComment #3
ruhaim CreditAttribution: ruhaim commentedHi Ahmed,
I tried your patch, seems ok.
But I suggest using the default display suite class instead of writing your own
We could replace the
class: '\Drupal\bootstrap_layouts\Plugin\Layout\BootstrapLayouts'
with
class: '\Drupal\ds\Plugin\DsLayout'
Any special reason / advantage of having your own?
Thanks,
Ruhaim
Comment #4
Ahmad Abbad CreditAttribution: Ahmad Abbad as a volunteer commentedHi Ruhaim,
That's what I was thinking about, but when we replace it to '\Drupal\ds\Plugin\DsLayout' that will make Bootstrap Layouts module dependence on Display suite module.
Comment #5
darol100 CreditAttribution: darol100 as a volunteer and commented@Ahmad Abbad, I believe this issue was fixed by #2788997: Contextual links not showing. We added { attributes.addClass('row') }} so other modules can add attributes. Can you check if you can add the attributes now ?
Comment #6
markhalliwellIt was not.
@Ahmad Abbad is correct that there needs to be a
bootstrap_layouts
specific class to handle this. And to confirm the question in #3, @Ahmad Abbad is also correct that it should be namespaced to this module, notds
, which would break any panels implementations (if they don't have DS installed).I'll work on getting this up to par.
Comment #7
markhalliwellRenaming title to better reflect what is happening which will also touch several other issues in this IQ, which I'll likely mark as dups of this one once I have a working patch here.
Also, I ran into this semi-related bug in DS.
Comment #8
markhalliwellThis is essentially going to be a refactor.
I'm almost done and hope to have a patch up shortly, which will also include an update hook to update existing layout instances. Unfortunately any themes that implemented their own custom templates will need to be manually updated.
That being said, I think it would make more sense to create a 8.x-4.x branch. I don't think we'll need to worry about keeping BS major version parity here.
If/when BS4 has different markup/classes... we can discuss how to handle that (likely some sort of setting that can be toggled).
Comment #9
markhalliwellAlright, here's the massive patch that completely refactors the module to take advantage of plugins.
Overview:
3.0.0
version based folder. I did this as a way to, in the future, create version based templates if needed. This allows this to be committed to a new 8.x-4.x branch and thus allowing us to break the framework major version parity.8401
that can be run to convert any existing templates. There's an elaborate update hook/plugin system available to easy allow processing of existing templates (for future changes). Currently, due to the fact that "Panels" is just an API in D8, the only handlers supported in this update are Display Suite and Page Manger. I thought about Panelizer, but it didn't seem to have that much usage. That can be a follow-up issue/update.Comment #10
markhalliwellOh, I also meant to mention that I plan on (eventually) looking into developing a more interactive UI (e.g. sliders, checkboxes, breakpoint management, etc.) like Omega has done to replace all this multitude of classes. However, for now, this is a great start as it (at the very least) allows for a very dynamic base layout.
Comment #11
markhalliwellComment #12
markhalliwellThis needs to check if
$old_region !== $region
so it doesn't delete the region during the update.Follow-up issue once this gets committed.
Comment #13
Ahmad Abbad CreditAttribution: Ahmad Abbad as a volunteer commentedHi markcarver,
Thank you for the great patch.
I have test it and it's worked good.
Comment #14
markhalliwellComment #16
markhalliwellComment #17
markhalliwellRe: #12, I went ahead and made the necessary changes during the commit.
Comment #18
markhalliwellOkie dokie. This is more or less done :D