![]() I've included conditionals in the layout because for some, if there is nothing entered in that particular field then I'd rather there be nothing at all OR something in place for it rather than others. Since I named my fluid field content_blocks, I will have to include this before the accordion field with an opening and closed tag and place the Bootstrap Accordion snippet in between so that EE Grid field can repeat a new Accordion row. I'll just name it accordion, while giving the grid fields a title and description.Īfter the fields are created, we'll start by declaring the fluid field name and the grid field we just created around the code snippet for the accordion component. ![]() Next, I'll create the fieldtype using a grid, so I can repeat the accordion rows. content-blocks where I format all the fluid fields.Īfter I've copied the html, I'll delete the other examples since I only really need one to do the job. It's just a bit of a habit, and maybe I'll change ways in the future. Furthermore, I know there is a template partials folder created for this type of thing, but I've been creating an includes folder for years. I keep these fields in an includes folder to reuse for other templates if needed. I'll start this by copying the snippet from the documentation and pasting it where I keep the fluid fields. So, let's start off by making Bootstrap's Accordion component a fluid field type.Īccordion - Bootstrap v5.0 - link to the documentation. I'll be starting out by making a series of posts focusing on those certain components and how to make them more usable and powerful with EE. I've used Bootstrap for years and I've always been really fond of all the components it offers. Making dynamic content with ExpressionEngine is one of my favorite things to do. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |