Closed kupoback closed 1 year ago
Seems that no matter what I do to make the DB call for the get_field, it will always return either null or default to my final ternary expression.
The get_field()
stuff should mostly be fixed from #163
The remaining stuff will get fixed when #154 is merged in.
Closing this and keeping #144 open.
So I am looking to build a block that will support something like React or Vue. I see you have the
enqueue
method here, which executes the Sage 10 bundle code, however, I noticed that any data I need from this block is not passable. I am wondering if there is something I need to do differently, or another way to approach this.Basically in Sage 9, what I do in the Controller file is just run
wp_enqueue_scripts
passing in the get_field functions to the array data. Since I'm using gutenberg blocks, I'm not 100% familiar with executing this, or if this package allows the support of this.This is what my enqueue block looks like, and the post_id is being set as such due to it being a page declared to "page_for_posts". I can get the values on the front end but just not these localize values.
This is what the frontend returns: