This is either a bug or I am missing something. I have an accordion item where I am setting the Id attribute using dynamic content to “Folder”. I also have a button which is my trigger element where I am setting custom attributes of data-x-toggle=1 and data-x-toggleable=Folder. When I preview the page and click on the button, nothing happens. When I use the browser to inspect the html, the accordion item element shows id=Folder as expected. But the related internal child elements which include the data-x-toggleable attribute still show the original internal id. If I change the data-x-toggleable attribute on my button to the internal id that is shown, then clicking the button toggles the accordion item as expected. Using the internal id is not really an acceptable workaround because the internal id can change as you continue to develop the page and add or remove elements. Please advise.
I should add that I am setting the id attribute in the id field that is on the screen. I am not setting it as a custom attribute. I can also confirm that dynamic content is not working for custom attributes on an accordion item.
Hi @envato_appx_com,
Thanks for reaching out.
It will be very difficult to recognize the exact reason without investigation. I would suggest you please provide login credentials for your site in a secure note to examine it further, including:
– WordPress Site URL & Login URL
– WordPress Admin username/password
– Specific page where you have added it
To create a secure note, click the key icon underneath any of your posts.
Thanks
I have created a simple replication and provided the requested information.
Hello @envato_appx_com,
Please understand that if you check the documentation here; https://theme.co/docs/toggleable, the Toggleables feature does not include the Accordion element because the Accordion element has a different element structure. This is why applying the Toggleable will not simply work out of the box with the Accordion element.
Hope this makes sense.
Thank you for clarifying this point. I would like to ask that you consider “enhancing” the accordion element to fully support the toggle features.
Until then, perhaps the documentation should specifically say that accordion elements cannot be controlled using data-x- toggle and data-x-toggleable. The first section of the Toggleable documentation page discusses the Toggle Hash feature which is in fact supported for the accordion element as described on the documentation page for the accordion element even though the Toggleable page does not specifically indicate this. Because the accordion element is a toggleable element and because the Hash Toggle feature is supported, my (incorrect) assumption was that the Toggleable documentation page did not include the accordion element in the list of toggleable elements due to an oversight.
Hello @envato_appx_com,
Your feedback has been duly noted. I will forward your concerns to our Developers for further consideration.
Cheers.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.