- Tell us what you are trying to do?
Kindly I want to make the results appearing in my views to appear as Accordion Collapsible so the user can see less or more results in one page.
Forgive me I’m not a developer, that’s why I use Toolset to use UI ... but needed to know how to apply it.
Even when Luo gave me the link about the Accordion I didn’t know how to apply it in my case, where, how...? So kindly simply explain to me How & Where that you suggest me to do or did on my behalf so that I learn.
- Is there any documentation that you are following?
No.
- Is there a similar example that we can see? hidden link
- What is the link to your site?
Lifechangingtruth.org
You mean that if your View shows a page of 10 results, each result should appear inside its own collapsed accordion pane (presumably with the post title as the title of the tab)?
And the users would click the post title to expand the pane to see more details (featured image, post excerpt, whatever).
I'm not sure if you have an existing solution for accordion panels.
Toolset works with Bootstrap (check the settings at Toolset > Settings to make sure Bootstrap is loaded by Toolset, unless you have a reason not to), and the markup required for accordions is described here: hidden link
To output a View as accordions you can take the markup from the Bootstrap documentation example and adapt it so that it is "dynamic", i.e. not only the content but the markup that is required for the accordions to work is generated for each iteration of the loop of post results.
You need a wrapper div which appears only once, so I edited the Loop Output section of the View to add it outside of the wpv-loop tags, but within the wpv-items-found shortcodes, like so:
There I am not only using the wpv-post-title and wpv-post-excerpt shortcodes to output the panel headers and panel contents for each post, but I'm also using wpv-post-id to create unique IDs for the sections for each iteration of the loop, so that the opening and closing of the panels functions.
If you use a different solution than Bootstrap, the details will be different, but the principles the same.
I want to show the the sub taxonomies carrying this
-- (Second)
--- (Third)
Posts (in table to be hidden or unhidden on clicking on them)
Sorry about that for I"m not a developer & then I'll imitate what you did in another cases.
I don't know exactly the following to teach me please let me know exactly how to do it myself in my current case:
- Where I should add this code before or after the codes in the View?
- Where to be added (which View (Parent, Child or Posts or in all?)?
- Shall I create a template for t his?
Nigel is away until early next week, but I'll be happy to follow up on this ticket.
As much as we would like to help, the scope of support that we provide is limited to Toolset's own features and options. You can read details about what is covered under our support policy at https://toolset.com/toolset-support-policy/
For a more personalized and efficient assistance around custom HTML, CSS and Javascript code, you can consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/
We do our best to guide in the right direction, whenever possible and to split the results of your parent view ( "Parent - Public - Ar - Subjects" ) into a collapsible accordion ( ref: hidden link ), you can update its code in "Loop Editor" section, from:
The nested accordion is now working and you can update the code of any inner results accordingly.
Important note: For a more personalized and efficient assistance around custom code, we recommend hiring a professional from our list of recommended contractors: https://toolset.com/contractors/