自定义内容属性说明

自定义内容属性说明,平时上架商品时候定制模版有自定义信息需要对称,可以继续看!
先上2图!

自定义属性说明: .form.php 固定
属性配置对应目录模版文件:templates/模版目录/modular/文件名称随意.form.php

属性列表1参数

  1. [{
  2. "name": "名称1",
  3. "id": "code1",
  4. "relation": "news,product",
  5. "show": "1",
  6. "show_add_bin": true,
  7. "placeholder": "功能描述说明",
  8. "modules": [{
  9. "type": "input",
  10. "name": "name1",
  11. "label": "名称1",
  12. "value": "默认",
  13. "placeholder": "第一集"
  14. }
  15. , {
  16. "type": "upfile",
  17. "name": "content",
  18. "label": "电影播放源",
  19. "value": "1",
  20. "placeholder": "https://xxxxx/1.mp4"
  21. }, {
  22. "type": "input",
  23. "name": "name22",
  24. "label": "名称input",
  25. "value": "2",
  26. "placeholder": "剧情描述"
  27. }
  28. ]
  29. }, {
  30. "name": "名称2",
  31. "id": "code2",
  32. "relation": "news,pured",
  33. "show": "2",
  34. "show_add_bin": true,
  35. "placeholder": "功能描述说明",
  36. "modules": [{
  37. "type": "input",
  38. "name": "name1",
  39. "label": "名称input",
  40. "value": "",
  41. "placeholder": "第一集"
  42. }, {
  43. "type": "upfile",
  44. "name": "name2",
  45. "label": "电影播放源",
  46. "value": "",
  47. "placeholder": "https://xxxxx/1.mp4"
  48. }, {
  49. "type": "input",
  50. "name": "name3",
  51. "label": "名称input",
  52. "value": "",
  53. "placeholder": "剧情描述"
  54. }]
  55. }]

属性参考2

  1. [{
  2. "name": "名称3",
  3. "id": "code3",
  4. "relation": "news,pured",
  5. "show": "3",
  6. "show_add_bin": true,
  7. "class": "",
  8. "placeholder": "功能描述说明",
  9. "modules": [{
  10. "type": "select",
  11. "name": "name1",
  12. "label": "名称select",
  13. "value": "1",
  14. "select": [{
  15. "1a": "选择项1"
  16. }, {
  17. "2a": "选择项11"
  18. }, {
  19. "3a": "选择项13"
  20. }],
  21. "placeholder": "第一集"
  22. }, {
  23. "type": "upfile",
  24. "name": "content",
  25. "label": "电影播放源upfile",
  26. "value": "",
  27. "placeholder": "https://xxxxx/1.mp4"
  28. }, {
  29. "type": "input",
  30. "name": "name3",
  31. "label": "名称input",
  32. "value": "",
  33. "select": ["选择项11", "选择项12", "选择项13"],
  34. "placeholder": "剧情描述"
  35. }]
  36. }, {
  37. "name": "名称4",
  38. "id": "code4",
  39. "relation": "news,product",
  40. "show": "3",
  41. "show_add_bin": true,
  42. "placeholder": "",
  43. "modules": [{
  44. "type": "input",
  45. "name": "name1",
  46. "label": "",
  47. "value": "",
  48. "placeholder": "第一集"
  49. }, {
  50. "type": "upfile",
  51. "name": "content",
  52. "label": "",
  53. "value": "",
  54. "placeholder": "https://xxxxx/1.mp4"
  55. }, {
  56. "type": "input",
  57. "name": "name3",
  58. "label": "",
  59. "value": "",
  60. "placeholder": "剧情描述"
  61. }]
  62. }]

配置说明

  1. [{
  2. "name": "栏目显示名称",
  3. "id": "属性为一,重按搜第一个为准",
  4. "relation": "对应内容模版 content.news.hdsys.php 填news就会news模版显示该属性,多个,隔开",
  5. "show": "默认显示行数",
  6. "show_add_bin": 是否支持添加更多属性 true/fanlse,
  7. "class": "",
  8. "placeholder": "功能描述说明",
  9. "modules": [{
  10. "type": "select", //select/input/upfile,注意select属性input是单数组,selectkey
  11. "name": "name1",
  12. "label": "名称select",
  13. "value": "1",
  14. "select": [{
  15. "1a": "选择项1"
  16. }, {
  17. "2a": "选择项11"
  18. }, {
  19. "3a": "选择项13"
  20. }],
  21. "placeholder": "第一集"
  22. }, {
  23. "type": "upfile",
  24. "name": "content",
  25. "label": "电影播放源upfile",
  26. "value": "",
  27. "placeholder": "https://xxxxx/1.mp4"
  28. }, {
  29. "type": "input",
  30. "name": "name3",
  31. "label": "名称input",
  32. "value": "",
  33. "select": ["选择项11", "选择项12", "选择项13"],
  34. "placeholder": "剧情描述"
  35. }]
  36. }, {
  37. "name": "名称4",
  38. "id": "code4",
  39. "relation": "news,product",
  40. "show": "3",
  41. "show_add_bin": true,
  42. "placeholder": "",
  43. "modules": [{
  44. "type": "input",
  45. "name": "name1",
  46. "label": "",
  47. "value": "",
  48. "placeholder": "第一集"
  49. }, {
  50. "type": "upfile",
  51. "name": "content",
  52. "label": "",
  53. "value": "",
  54. "placeholder": "https://xxxxx/1.mp4"
  55. }, {
  56. "type": "input",
  57. "name": "name3",
  58. "label": "",
  59. "value": "",
  60. "placeholder": "剧情描述"
  61. }]
  62. }]

没备注说明属性和标准inpit对应.

设置模版中文和英文会自动读取对应目录,代码可以通过详情页查看
在modules=中文emodules=英文
$data.modules.{id}.{name} = $data.modules.{id}.{name}.{0}
$data.modules.{id}.{name}.{0….99}

{name}=>上方json路径modules.name
列表属性可以通过循环出来也是可以.调用循环就可以
{@print_r($data)}

调用标签参考:
{$vo.modules.paper.name}
{$vo.modules.paper.name.0}
{$vo.modules.paper.info.0}

循环麻烦也可这样重写代码

  1. {if $data.modules.paper.apiname!=''}
  2. <table border="0" cellspacing="0" cellpadding="0" width="100%" class="layui-table ke-zeroborder">
  3. <tbody>
  4. <tr>
  5. <td class="tdCANNAME">名称:</td>
  6. <td colspan="2">{$data.modules.paper.apiname}</td>
  7. </tr>
  8. <tr>
  9. <td class="tdCANNAME">API:</td>
  10. <td colspan="2">{$data.modules.paper.api}</td>
  11. </tr>
  12. <tr>
  13. <td class="tdCANNAME">说明:</td>
  14. <td colspan="2">{$data.modules.paper.long}</td>
  15. </tr>
  16. <tr>
  17. <td class="tdCANNAME">返回说明:</td>
  18. <td colspan="2">{$data.modules.paper.ret}</td>
  19. </tr>
  20. <tr class="tdtable">
  21. <td width="122">
  22. <div class="tdtable">参数</div>
  23. </td>
  24. <td>
  25. <div class="tdtable">说明</div>
  26. </td>
  27. <td width="311">
  28. <div class="tdtable">注释</div>
  29. </td>
  30. </tr>
  31. {if !empty($data.modules.apiparam.pram.0)}
  32. <tr>
  33. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.0}=</td>
  34. <td width="215">{$data.modules.apiparam.name.0}</td>
  35. <td>{$data.modules.apiparam.tages.0}</td>
  36. </tr>
  37. {/if}
  38. {if !empty($data.modules.apiparam.pram.1)}
  39. <tr>
  40. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.1}=</td>
  41. <td width="215">{$data.modules.apiparam.name.1}</td>
  42. <td>{$data.modules.apiparam.tages.1}</td>
  43. </tr>
  44. {/if}
  45. {if !empty($data.modules.apiparam.pram.2)}
  46. <tr>
  47. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.2}=</td>
  48. <td width="215">{$data.modules.apiparam.name.2}</td>
  49. <td>{$data.modules.apiparam.tages.2}</td>
  50. </tr>
  51. {/if}
  52. {if !empty($data.modules.apiparam.pram.3)}
  53. <tr>
  54. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.3}=</td>
  55. <td width="215">{$data.modules.apiparam.name.3}</td>
  56. <td>{$data.modules.apiparam.tages.3}</td>
  57. </tr>
  58. {/if}
  59. {if !empty($data.modules.apiparam.pram.4)}
  60. <tr>
  61. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.4}=</td>
  62. <td width="215">{$data.modules.apiparam.name.4}</td>
  63. <td>{$data.modules.apiparam.tages.4}</td>
  64. </tr>
  65. {/if}
  66. {if !empty($data.modules.apiparam.pram.5)}
  67. <tr>
  68. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.5}=</td>
  69. <td width="215">{$data.modules.apiparam.name.5}</td>
  70. <td>{$data.modules.apiparam.tages.5}</td>
  71. </tr>
  72. {/if}
  73. {if !empty($data.modules.apiparam.pram.6)}
  74. <tr>
  75. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.6}=</td>
  76. <td width="215">{$data.modules.apiparam.name.6}</td>
  77. <td>{$data.modules.apiparam.tages.6}</td>
  78. </tr>
  79. {/if}
  80. {if !empty($data.modules.apiparam.pram.7)}
  81. <tr>
  82. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.7}=</td>
  83. <td width="215">{$data.modules.apiparam.name.7}</td>
  84. <td>{$data.modules.apiparam.tages.7}</td>
  85. </tr>
  86. {/if}
  87. {if !empty($data.modules.apiparam.pram.8)}
  88. <tr>
  89. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.8}=</td>
  90. <td width="215">{$data.modules.apiparam.name.8}</td>
  91. <td>{$data.modules.apiparam.tages.8}</td>
  92. </tr>
  93. {/if}
  94. {if !empty($data.modules.apiparam.pram.9)}
  95. <tr>
  96. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.9}=</td>
  97. <td width="215">{$data.modules.apiparam.name.9}</td>
  98. <td>{$data.modules.apiparam.tages.9}</td>
  99. </tr>
  100. {/if}
  101. {if !empty($data.modules.apiparam.pram.10)}
  102. <tr>
  103. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.10}=</td>
  104. <td width="215">{$data.modules.apiparam.name.10}</td>
  105. <td>{$data.modules.apiparam.tages.10}</td>
  106. </tr>
  107. {/if}
  108. {if !empty($data.modules.apiparam.pram.11)}
  109. <tr>
  110. <td class="tdcan tong" width="122">&{$data.modules.apiparam.pram.11}=</td>
  111. <td width="215">{$data.modules.apiparam.name.11}</td>
  112. <td>{$data.modules.apiparam.tages.11}</td>
  113. </tr>
  114. {/if}
  115. {if !empty($data.modules.apiparam.pram.12)}
  116. <tr>

友情连接: 论文查重 SitemapXMlL BSPHP验证系统
Copyright cms 2025 专注互联网开发10多年,开源CMS, CMS系统, 免费cms, CMS,CMS建站系统 . HdsysCms海胆建站系统 HdSysCms 网站地图 Tage标签