I am brand new (literally) to Cwicly and was mainly drawn to it due to a need to create a website that relies heavily on Page templates with flexible layouts. I.e. templated pages (not just posts) with dynamic content that may have different arrangements of content.
My thought was to try to use ACF Pro’s flexible content field to achieve this, but now I am wondering if Fragments and template parts can essentially do the same thing - where a Fragment Block is used when assembling a page rather than an ACF Flexible Content block. Would that work?
Can anyone with Cwicly experience comment on this? If I am correct that either approach can work I am curious about the trade offs inherent in each approach.
Or I might be misunderstanding entirely how fragments work, as I have yet to conduct my own experiments.
Great to have you on board, welcome!
At this time, Flexible Content isn’t properly integrated into Cwicly. This is because the templating process requires its own block (rows), much like the repeater.
This is something we have been working on but haven’t finalised yet. Apologies for the inconvenience.
As for Fragments and Template Parts, they can be used in this way, but it depends what content you want to use dynamically, as we won’t be able to access Flexible fields.
Don’t hesitate to give me a few more details if possible.
Thank you @Louis for your quick reply. What I am envisioning is creating ACF fields for Pages (section titles, section header image, section content, etc) and creating ‘mini-templates’ (or you could call them modular ‘components’) such that a Page can be ‘assembled’ by adding these mini-templates as needed, each one pointing to respective ACF fields, in any order the author chose.
ACF Flexible Content lets the Author do this, but as you say, this is not yet integrated into Cwicly. So can this same thing be achieved using the Fragments block?
On further reflection my guess is it would not because the Fragment block would not know which ACF fields to render. If a Page had 2 sections, both using the same Fragment/mini-template, how would its dynamic fields be pointed to the correct data from the Page?
Hi @webdev ,
We are in the same situation because it is really powerful to build a custom dynamic layout using Flexible Content from ACF Pro.
As the Founder Louis said, this
// Check value exists.if( have_rows('content') ): templating process requires its own (rows) block, so now Cwicly can not start to loop the rows.
That’s why we are trying to working with thier Repeater Block based on the Conditional Logic for the Custom Fields and the Condition for the blocks used in the templates.
Obviously, this way lose the flexibility to reorder the layouts inside the row and a lot more.
But hope this can give you some directions.
As the flexible content field more often requires hand coding by developers.
Please also share with us if you have any good solutions.
Will this be integrated in the future? Because this really matters to the efficiency of creating content.
It will definitely save users lots of time.
This is also the marketing gap, which will allow non-developers to get the full power of the Flexible Content from ACF Pro.
Because there was indeed some plugins that support Elementor to render the flexible content.
If your team can get this done, will really take not only Cwicly but also all WP users to the next level on the fly.
I would like to add that we’re also thinking about how to simplify Cwicly for a non-developer. ACF Flexible content feels like a nice balance between control for the customer while they can’t break the design.
In an ideal world, the customer would only have rights to the ACF fields and we can set up a Cwicly element for each row layout.
Can you make this happen in the future? @Louis
hope it can have in the future.