<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Adding (Collapse) accordion doesn't work (DXP 7.3)</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120810440" />
  <subtitle>Adding (Collapse) accordion doesn't work (DXP 7.3)</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120810440</id>
  <updated>2026-10-15T10:32:21Z</updated>
  <dc:date>2026-10-15T10:32:21Z</dc:date>
  <entry>
    <title>RE: Adding (Collapse) accordion doesn't work (DXP 7.3)</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120830394" />
    <author>
      <name>Louis-Guillaume Durand</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120830394</id>
    <updated>2021-06-18T09:47:53Z</updated>
    <published>2021-06-18T09:28:44Z</published>
    <summary type="html">&lt;p&gt;It seems that your snippet is using an older version of Bootstrap
  than v4. So for example, these data attributes are not valid with
  Bootstrap v4:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-html"&gt;data-bs-toggle=&amp;quot;collapse&amp;quot; data-bs-target=&amp;quot;#collapseOne&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I successfully tried the snippet provided in the Boostrap
  documentation with a Page Fragment and a Freemarker Template: &lt;a href="https://getbootstrap.com/docs/4.0/components/collapse/#accordion-example"&gt;https://getbootstrap.com/docs/4.0/components/collapse/#accordion-example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you confirm wether this snippet is working or not for you?&lt;/p&gt;
&lt;p&gt;
  &lt;u&gt;EDIT&lt;/u&gt;: &lt;strong&gt;You need to enable jQuery&lt;/strong&gt; (Control Panel
  &amp;gt; System Settings &amp;gt; Third Party &amp;gt; jQuery).&lt;/p&gt;</summary>
    <dc:creator>Louis-Guillaume Durand</dc:creator>
    <dc:date>2021-06-18T09:28:44Z</dc:date>
  </entry>
  <entry>
    <title>Adding (Collapse) accordion doesn't work (DXP 7.3)</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120810439" />
    <author>
      <name>Nick Burton</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120810439</id>
    <updated>2021-05-28T16:08:11Z</updated>
    <published>2021-05-28T16:08:11Z</published>
    <summary type="html">&lt;p&gt;I have tried to add an accordian to a Web Content Article Display Template.&lt;/p&gt;
&lt;p&gt;The styling is correct, but the animation (javascript) doesn't work.&lt;/p&gt;
&lt;p&gt;What step have I missed?&lt;br /&gt;I was under the impression that
  bootstrap was added by default.&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h1&gt;EXAMPLE CODE USED:&lt;/h1&gt;
&lt;p&gt;
  &lt;code&gt;&amp;lt;div class=&amp;quot;accordion&amp;quot;
    id=&amp;quot;accordionExample&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;div
    class=&amp;quot;accordion-item&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;h2
    class=&amp;quot;accordion-header&amp;quot;
    id=&amp;quot;headingOne&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;button
    class=&amp;quot;accordion-button&amp;quot; type=&amp;quot;button&amp;quot;
    data-bs-toggle=&amp;quot;collapse&amp;quot;
    data-bs-target=&amp;quot;#collapseOne&amp;quot;
    aria-expanded=&amp;quot;true&amp;quot;
    aria-controls=&amp;quot;collapseOne&amp;quot;&amp;gt;&lt;br /&gt;        Accordion
    Item #1&lt;br /&gt;      &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;/h2&amp;gt;&lt;br /&gt;   
    &amp;lt;div id=&amp;quot;collapseOne&amp;quot; class=&amp;quot;accordion-collapse
    collapse show&amp;quot; aria-labelledby=&amp;quot;headingOne&amp;quot;
    data-bs-parent=&amp;quot;#accordionExample&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;div
    class=&amp;quot;accordion-body&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;strong&amp;gt;This
    is the first item's accordion body.&amp;lt;/strong&amp;gt; It is shown by
    default, until the collapse plugin adds the appropriate classes that
    we use to style each element. These classes control the overall
    appearance, as well as the showing and hiding via CSS transitions.
    You can modify any of this with custom CSS or overriding our default
    variables. It's also worth noting that just about any HTML can go
    within the &amp;lt;code&amp;gt;.accordion-body&amp;lt;/code&amp;gt;, though the
    transition does limit overflow.&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;   
    &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div
    class=&amp;quot;accordion-item&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;h2
    class=&amp;quot;accordion-header&amp;quot;
    id=&amp;quot;headingTwo&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;button
    class=&amp;quot;accordion-button collapsed&amp;quot; type=&amp;quot;button&amp;quot;
    data-bs-toggle=&amp;quot;collapse&amp;quot;
    data-bs-target=&amp;quot;#collapseTwo&amp;quot;
    aria-expanded=&amp;quot;false&amp;quot;
    aria-controls=&amp;quot;collapseTwo&amp;quot;&amp;gt;&lt;br /&gt;        Accordion
    Item #2&lt;br /&gt;      &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;/h2&amp;gt;&lt;br /&gt;   
    &amp;lt;div id=&amp;quot;collapseTwo&amp;quot; class=&amp;quot;accordion-collapse
    collapse&amp;quot; aria-labelledby=&amp;quot;headingTwo&amp;quot;
    data-bs-parent=&amp;quot;#accordionExample&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;div
    class=&amp;quot;accordion-body&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;strong&amp;gt;This
    is the second item's accordion body.&amp;lt;/strong&amp;gt; It is hidden by
    default, until the collapse plugin adds the appropriate classes that
    we use to style each element. These classes control the overall
    appearance, as well as the showing and hiding via CSS transitions.
    You can modify any of this with custom CSS or overriding our default
    variables. It's also worth noting that just about any HTML can go
    within the &amp;lt;code&amp;gt;.accordion-body&amp;lt;/code&amp;gt;, though the
    transition does limit overflow.&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;   
    &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div
    class=&amp;quot;accordion-item&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;h2
    class=&amp;quot;accordion-header&amp;quot;
    id=&amp;quot;headingThree&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;button
    class=&amp;quot;accordion-button collapsed&amp;quot; type=&amp;quot;button&amp;quot;
    data-bs-toggle=&amp;quot;collapse&amp;quot;
    data-bs-target=&amp;quot;#collapseThree&amp;quot;
    aria-expanded=&amp;quot;false&amp;quot;
    aria-controls=&amp;quot;collapseThree&amp;quot;&amp;gt;&lt;br /&gt;        Accordion
    Item #3&lt;br /&gt;      &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;/h2&amp;gt;&lt;br /&gt;   
    &amp;lt;div id=&amp;quot;collapseThree&amp;quot; class=&amp;quot;accordion-collapse
    collapse&amp;quot; aria-labelledby=&amp;quot;headingThree&amp;quot;
    data-bs-parent=&amp;quot;#accordionExample&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;div
    class=&amp;quot;accordion-body&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;strong&amp;gt;This
    is the third item's accordion body.&amp;lt;/strong&amp;gt; It is hidden by
    default, until the collapse plugin adds the appropriate classes that
    we use to style each element. These classes control the overall
    appearance, as well as the showing and hiding via CSS transitions.
    You can modify any of this with custom CSS or overriding our default
    variables. It's also worth noting that just about any HTML can go
    within the &amp;lt;code&amp;gt;.accordion-body&amp;lt;/code&amp;gt;, though the
    transition does limit overflow.&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;   
    &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;
  &lt;br /&gt; &lt;/p&gt;</summary>
    <dc:creator>Nick Burton</dc:creator>
    <dc:date>2021-05-28T16:08:11Z</dc:date>
  </entry>
</feed>
