mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
IMPR: Add some options to Accordion element
This commit is contained in:
parent
703cea1bf0
commit
f959f8d84b
@ -1,28 +1,28 @@
|
||||
<% if $ElementFilteredControllers %>
|
||||
<div id="ElementAccordion{$ID}" class="accordion">
|
||||
<% loop $ElementFilteredControllers %>
|
||||
<div class="accordion-item">
|
||||
<div id="ElementHeader{$ID}" class="accordion-header">
|
||||
<button
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#ElementContent{$ID}"
|
||||
aria-expanded="<% if $First && $Up.OpenFirst %>true<% else %>false<% end_if %>"
|
||||
aria-controls="ElementContent{$ID}"
|
||||
class="accordion-button collapsed"
|
||||
>$Title</button>
|
||||
</div>
|
||||
<% loop $ElementFilteredControllers %>
|
||||
<div class="accordion-item">
|
||||
<div id="ElementHeader{$ID}" class="accordion-header">
|
||||
<button
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#ElementContent{$ID}"
|
||||
aria-expanded="<% if $First && $Up.OwnerPage.OpenFirst %>true<% else %>false<% end_if %>"
|
||||
aria-controls="ElementContent{$ID}"
|
||||
class="accordion-button collapsed"
|
||||
>$Title</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="ElementContent{$ID}"
|
||||
class="accordion-collapse collapse<% if $First && $Up.OpenFirst %> show<% end_if %>"
|
||||
aria-labelledby="ElementHeader{$ID}"
|
||||
<% if not $Up.KeepOpenned %>
|
||||
data-bs-parent="#ElementAccordion{$Parent.ID}"
|
||||
<% end_if %>
|
||||
>
|
||||
<div class="accordion-body">$Me</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<div
|
||||
id="ElementContent{$ID}"
|
||||
class="accordion-collapse collapse<% if $First && $Up.OwnerPage.OpenFirst %> show<% end_if %>"
|
||||
aria-labelledby="ElementHeader{$ID}"
|
||||
<% if not $Up.OwnerPage.KeepOpenned %>
|
||||
data-bs-parent="#ElementAccordion{$Parent.ID}"
|
||||
<% end_if %>
|
||||
>
|
||||
<div class="accordion-body">$Me</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
Loading…
Reference in New Issue
Block a user