๐Ÿ—‚๏ธ Multi-select Loops (Custom Models)

Last updated๏ผš2026-11-25

๐Ÿ—‚๏ธ Content Multi-select Iteration (Content Models)

The system supports custom content models that can carry any type of enterprise content (e.g. qualification certificates, honors, team, partner brands). Admin path: Admin โ†’ Content Management โ†’ Content Models

๐Ÿ“– Content Model Notes

Each model can have custom extended fields, and data is automatically stored in a dedicated table. - Built-in models: news / product / case / page - Custom models: created via “Content Models โ†’ Add Model”, with a unique code (e.g. certificate, honor, team) - Extended fields: added in “Field Settings”; after saving, a new column is automatically added to the data table - Template usage: fetch with {{range list "type=model-code"}}

โš ๏ธ ๆณจๆ„

list only returns standard fields: ID / Title / Summary / Image / Thumbnail / CreatedAt / IsRecommend / URL. Extended fields added for a custom model in “Field Settings” (e.g. issuing authority, issue date) do not appear in list results; they must be used on that model’s detail page (only the detail page returns the complete data row).

๐Ÿ’ป Usage Example

<!-- Fetch custom model content (type takes the model code, e.g. certificate) -->
{{range list "type=certificate&num=6&order=date"}}
<div class="item">
  <img src="{{.Image}}" alt="{{.Title}}">
  <h4>{{.Title}}</h4>
  <p>{{.Content}}</p>
</div>
{{end}}
<!-- Custom model + standard fields (available in list) -->
{{range list "type=honor&num=12&order=date"}}
<div class="honor-item">
  <h4>{{.Title}}</h4>
  <img src="{{.Image}}" alt="{{.Title}}">
  <p>{{.Summary}}</p>
</div>
{{end}}
<!-- Extended fields (e.g. .IssuingAuthority / .IssueDate) are only available on the "detail page"; list does not return them -->

๐Ÿ“‹ Multi-select Iteration (Array Fields)

For multi-select fields (e.g. partner brands, related products), stored as JSON arrays and iterated with splitJSON. โš ๏ธ These fields are extended fields, only available on content detail pages; they do not appear when fetching lists with list, and iterating them yields nothing.

”`html {{if .Brands}}

{{range splitJSON .Brands}} Partner brand {{end}}
{{end}}

{{range splitJSON .RelatedIDs}} View Related Product โ†’ {{end}} “` โ† tags Tags Breadcrumbs โ†’

This site uses cookies for essential functionality and to improve your experience. See our Privacy Policy.