Guest User

Untitled

a guest
Dec 13th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. return (
  2. <h1 cmsContent = {{
  3. id:'h1',
  4. type: 'Text'}}>
  5. </h1>
  6.  
  7.  
  8. <div cmsContent = {{
  9. id:'blocks',
  10. type: 'ManyReferences',
  11. referenceTime: 2}}>
  12.  
  13. {this.state.cmsContent.blocks.map( block => {
  14.  
  15. return (
  16. <div>
  17. <div cmsContent= {{
  18. id:'title',
  19. type: 'Text'}}
  20. ></div>
  21. <p cmsContent= {{
  22. id:'description',
  23. type: 'Text'}} ></p>
  24. </div>
  25. );
  26. })}
  27.  
  28. <h2 cmsContent = {{
  29. id:'h2',
  30. type: 'Text'}} ></h2>
  31.  
  32. const json = { fields: [
  33. {
  34. id: 'h1',
  35. required: true,
  36. type: 'Text'
  37. },
  38. {
  39. blocks: [{
  40. fields : [
  41. { id: 'title1', required: true, type:'Text' },
  42. { id: 'description1', required: true, type:'Text' }
  43. ] },
  44. fields : [
  45. { id: 'title2', required: true, type:'Text' },
  46. { id: 'description2', required: true, type:'Text' }
  47. ] }
  48. },
  49. {
  50. id: 'h2',
  51. required: true,
  52. type: 'Text'
  53. }
  54. ]
Add Comment
Please, Sign In to add comment