'render_code'

Support MB Blocks 'render_code'Resolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35598
    Aaron KesslerAaron Kessler
    Participant

    I noticed due to the visual custom post field builder that there is an 'render_code' property. I could not find anything about it in the documentation. It looks like a twig like syntax is supported? Could we use template files with twig-code, just like in mb views?

    #35609
    Long NguyenLong Nguyen
    Moderator

    Hi Aaron,

    Thanks for your feedback.

    The render code area works like the MB Views so we have not had the documentation about this section. And yes, you can write Twig code in this area. Some variables supported are listed below it.

    #35610
    Aaron KesslerAaron Kessler
    Participant

    I would suggest adding this property to the docs.

    I have a feature request then: Please support external template files like in mb views

    #35613
    Long NguyenLong Nguyen
    Moderator

    Hi,

    There is an option to render with Template file (above Code) to load the external template. Please read more on the documentation https://docs.metabox.io/extensions/mb-blocks/#render_template

    #35614
    Aaron KesslerAaron Kessler
    Participant

    It's not documented that the 'render_template' could contain twig code. I will give it a try, but I thought that twig is only valid in 'render_code'

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