Search code examples
modxmodx-chunks

Dynamic placeHolders


I would like ask, if anyone knows how can I make a dynamic placeholders using an array. Basically I have this structure, and need to create a placeholders where the "name" has the "content"

{
  "name": "bigTitle",
  "type": "text",
  "content": "Got a question?"
}

return placeholders with the content


Solution

  • Please use toPlaceholders method here, use can create own custom snippet/plugin (depends on how do you really use it) and run this this method inside.