Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Created July 8, 2019 00:42
Show Gist options
  • Save lots0logs/9b6bb0b3d494f4d0bdf957955d97cb26 to your computer and use it in GitHub Desktop.
Save lots0logs/9b6bb0b3d494f4d0bdf957955d97cb26 to your computer and use it in GitHub Desktop.
Render Dynamic Content In The Divi Builder
...
render() {
const title = this.props.dynamic.title;
const content = this.props.dynamic.content;
return (
<div>
<h2>{title.render()}</h2>
<div>{content.render('full')}</div>
</div>
);
}
...
@MTaimoor79
Copy link

@lots0logs
I am developing a module like the tabs module in which I have to get the child title field in the parent module and then display it.
But when I am adding dynamic content in the child title field then in the builder get the key like as below
"@ET-DC@eyJkeW5hbWljIjp0cnVlLCJjb250ZW50Ijoic2l0ZV90aXRsZSIsInNldHRpbmdzIjp7ImJlZm9yZSI6IiIsImFmdGVyIjoiIn19@"

Can you please tell me how I can get dynamic text from this key

Thanks
Taimoor

@arobbins
Copy link

I'm running into the same issue as @MTaimoor79 . Does anyone know of a way around this?

Oddly enough, the dynamic content value is coming through correctly on the PHP side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment