Home Forums ASE Support ASE and CMB2

This topic is: resolved

Tagged: 

Viewing 5 posts – 1 through 5 (of 5 total)
  • Author

    Posts

  • #5936

    Reply

    Mark Simchock

    Participant

    We’re using the CMB2 plugin for custom metaboxes + fields. One of CMB2 field types is WYSIWYG. When adding a WYSIWYG field the ASE Add Component continues to show.

    1) Is there a way to control this? That is, to allow the ASE A.C. button on some CMB2 WYSIWYG fields but not on others?

    2) If default ASE only runs against the_content, how can we force it to process / filter other CMB2 WYSIWYGs so the ASE components worth in those as well?

    Thanks in advance for your help.

    mfs

    #5937

    Reply

    Nick Haskins

    Keymaster

    Hey Mark!
    There isn’t a direct way to control the aesop add component button through CMB2 but you can hide it with css is the best suggestion I have there. I’m not sure the filters that we have for that button would work in that application.

    Can you clarify a bit more on #2? The components are shortcodes so if you’re saving field data in a wysiwyg field just echo out the var like so echo do_shortcode($var). That is if I understood your query correctly.

    Nick

    #5947

    Reply

    Mark Simchock

    Participant

    hey nick. thanks

    re: #2

    well, i’m presuming that ASE is primarily a filter (so to speak) of the_content. And that’s it. It has no awareness of any other WYSIWYG field type (as added via, say, CMBs). So while I can add ASE shortcode to the CMB2 WYSIWYG ASE doesn’t know they’re there. So I need to “force” that filed thought the AS “engine”. Is it as simple as say, say, do_shortcode?

    I guess it doesn’t help that I’m merging ASE and CMB2 for the first time at the same time. I’m sure I can figure this out – and even kinda feel like I should know the answer – but it was Sunday and I was thinking / hoping someone has asked this before and the answer / resolution already exists.

    What say you?

    #5959

    Reply

    Michael Beil

    Keymaster

    Just as an FYI, we have moved away from CMB: https://github.com/bearded-avenger/aesop-core/issues/179

    Perhaps reading up on the way we implement ours hooks and filters could help you resolve your query better? https://aesopstoryengine.com/developers/

    echo do_shortcode($var) could be your ticket as Nick shared.

    Let us know how it goes.

    #5966

    Reply

    Mark Simchock

    Participant

    Michael – Yeah. I know you guys dropped CMB. I can see why that would be. It’s overkill for something like ASE. In this case it’s ME who is using CMB. And now that I have more WYSIWYG than just the_content I want to be able to do ASE components in those as well.

    I’ll figure it out and report back. Thanks again.

Viewing 5 posts – 1 through 5 (of 5 total)
Reply To: ASE and CMB2