calling metabox filters inside render_template php file

Support MB Blocks calling metabox filters inside render_template php file

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44978
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I am using the rwmb_meta_boxes filter to create a block and use render_template to a PHP file e.g. below. I want to call a filter e.g. https://docs.metabox.io/category/filters/ inside the 'test.php' file. Is this possible? I am asking as I want a setting inside the block form to be passed into the filters to alter the form layout e.g. rwmb_outer_html

    $meta_boxes[] = [
    	'title'           => 'Product Basket',
    	'id'              => 'dc-product-basket-block',
    	'description'     => 'Product basket for your store',
    	'type'            => 'block',
    	'render_template' => __DIR__ . '/template/test.php',
    ];
    #44988
    PeterPeter
    Moderator

    Hello,

    No, it shouldn't be done like that. The Meta Box filters rwmb_ are used to modify the field input in the backend. While the template is used to display the field value. They are different places backend and frontend.

    #44995
    Nicholas CoxNicholas Cox
    Participant

    Yes but i am asking as i have a use case where if i was able to call a filter inside this file to use a block setting to define a filter parameter to affect the filter output.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.