• Resolved jabbadu

    (@jabbadu)


    Hey!

    I would like to extend the flexible content with a function that allows me to insert the stylized buttons between each content element.

    This should make it easier to be able to insert layouts between each element.

    Simple Example

    Can you give me a hint? I would like to adopt the functions 1:1, so the modal opens and all that stuff.

    Regards

    • This topic was modified 4 years, 11 months ago by jabbadu.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! You can already add a new layout between an already existing layout by using the “+” icon on the handle.

    Regarding your question, the logic is complex since the whole ACF javascript is based on backbone JS and you’ll have to deal with different scenario (initial render, layout appended, layout removed etc…).

    Unfortunately I don’t have the time to write tutorials on how backbone JS works in ACF, but you can start by taking a look at the Flexible Content JS source code in the acf-input-pro.js file, and try to interact with it in your own JS code. You can also look for backboneJS introduction articles on the web, it will help you to understand the code structure.

    You’ll also find some documentation on how JS hooks are working on the ACF Javascript API page, but it’s definitely not complete.

    Hope it helps!

    Regards.

    Thread Starter jabbadu

    (@jabbadu)

    Thanks mate! 🙂

    I will have a look at those functions.

    Thread Starter jabbadu

    (@jabbadu)

    Okay, i need some more input on this topic 😛

    I looked in the acf-pro-input.js andacfe-input.js file.

    Can you point me the direction?
    This one: Is there an easy way to trigger your (acfe) ‘Selection Modal’ for a specific Flexible-Content field?

    THX m8

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    The openLayout line:839 function (latest ACF Pro version file) is in charge of openning Flexible Content layouts. Please note that I cannot provide further assistance here, as the topic is slowly sliding into custom ACF development question and this forum is dedicated to the ACF Extended plugin support.

    You can try to join the ACF Support forum, they have some pretty experienced developers who may help you.

    Have a nice day!

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Extend Flexible Content “add new” between each layout’ is closed to new replies.