Display ACF Flexible Content Layouts

Hi,

I’ve been heavily using CCS and now I am trying to adapt to the new one. Thanks Eliot for your efforts and making these great plugins. The L&L seems to have a great potential. I knew CCS would retire sooner or later because it takes a lot of time and effort to write such a plugin and providing support for it. Being it’s free, it was not sustainable. I hope you find a way to monetise this one, while keeping it affordable for the non-commercial users. I am sure that with great documentation and many examples, the L&L is going to attract attention.

Anyway, here is my issue:

This is my code to ACF Flexible Content display :slight_smile:

[flex damages]
    [layout fet-result]
    <div class="single_acf_result"><span>[field fet-result]</span></div>
    [/layout]
    [layout fet-text]
    <div class="single_acf_text">[field fet-text]</div>
    [/layout]
    [layout fet-select]
    <p class="single_acf_select">[field fet-select]</p>
    [/layout]
    [/flex]

I am currently trying to convert it to L&L, but I could not succeed yet.

I’ve tried something like that:

 <Loop acf_flexible=damages>
  <If field=layout value=fet-result />
<Field fet-result />
<Else if field=layout value=layout_2 />
  Layout 2
</Loop>

Hi Mehmet, thank you for the kind words.

We’re developing a Pro add-on with premium/commercial features, including integrations with third-party plugins like WooCommerce, EDD, etc. We’re also working on template libraries and cloud server. Hopefully these will be ready for public beta testing phase soon.

It’s a long-term vision, like growing a garden, and I’m glad to see the design of the template language (also plugin architecture and foundation) is proving to be reliable, and flexible for a wide range of uses in building wesites.

I’m also enjoying how more people are starting to use the plugin. With CCS, I always wanted to create a sense of user community, and it seems to be happening with L&L.


About ACF Flexible Content field… I think the issue is that there’s an extra / for the If tag.

<If field=layout value=fet-result />

And it’s missing the closing tag </If>.

So, something like this should work:

<Loop acf_flexible=damages>
  <If field=layout value=fet-result>
    <Field fet-result />
    <Else if field=layout value=layout_2 />
    Layout 2
    <Else if field=layout value=layout_3 />
    Layout 3
  </If>
</Loop>
1 Like

Thanks.

Actually, I think I’ve found a way to convert the code to L&L.

fet-select and fet-result are is a SELECT fields, fet-text is WYSIWYG field.

<If field="damages" exists>
<Loop acf_flexible=damages>
  <Field acf_select=fet-select />
  <Field acf_select=fet-result />
  <Field acf_editor=fet-text />
</Loop>
</If>

The code seems to work. I wonder if there are any drawbacks of my code in terms of performance.