テンプレート処理中にエラーが発生しました。
For "?max" left-hand operand: Expected a sequence or collection, but this has evaluated to a number (wrapper: f.t.SimpleNumber):
==> (startIndex - 1)  [in template "57868206215768#32483061#37081361" at line 39, column 36]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign stopIndex = (startIndex - 1)?...  [in template "57868206215768#32483061#37081361" at line 39, column 15]
----
1<#assign 
2  groupFriendlyURL=themeDisplay.getScopeGroup().getFriendlyURL() 
3  groupPathFriendlyURLPublic=themeDisplay.getPathFriendlyURLPublic() + groupFriendlyURL 
4  navigationJSONObject=jsonFactoryUtil.createJSONObject(htmlUtil.unescape(navigation.getData()?trim)) 
5  breadcrumbJSONArray=navigationJSONObject.getJSONArray("breadcrumb") 
6  childrenJSONArray=navigationJSONObject.getJSONArray("children") 
7  parentJSONObject=navigationJSONObject.getJSONObject("parent") 
8  productJSONObject=breadcrumbJSONArray.getJSONObject(breadcrumbJSONArray.length()-1)!navigationJSONObject.getJSONObject("self") 
9  siblingsJSONArray=navigationJSONObject.getJSONArray("siblings") 
10  selfJSONObject=navigationJSONObject.getJSONObject("self")  
11/> 
12 
13<div class="learn-article-nav"> 
14  <div class="learn-article-breadcrumbs"> 
15    <div class="learn-article-breadcrumbs-content"> 
16      <div class="align-items-baseline d-flex justify-content-between mb-3"> 
17        <ul 
18          aria-label="breadcrumb navigation" 
19          class="learn-article-breadcrumb" 
20          role="navigation" 
21
22          <#if breadcrumbJSONArray.length() gt 0> 
23            <#if breadcrumbJSONArray.length() lt 3> 
24              <li> 
25                  <a href="/"><@clay["icon"] symbol="home-full" /></a> 
26              </li> 
27              <#list 0..breadcrumbJSONArray.length()-1 as i> 
28                <li> 
29                  <a href='${breadcrumbJSONArray.getJSONObject(i).getString("url")}'> 
30                    ${breadcrumbJSONArray.getJSONObject(i).getString("title")} 
31                  </a> 
32                </li> 
33              </#list> 
34            <#else> 
35              <li> 
36                  <a href='${breadcrumbJSONArray.getJSONObject(0).getString("url")}'>...</a> 
37              </li> 
38              <#assign startIndex = breadcrumbJSONArray.length() - 1> 
39              <#assign stopIndex = (startIndex - 1)?max(1)> 
40               
41              <#list startIndex..stopIndex as i> 
42                  <li> 
43                      <a href='${breadcrumbJSONArray.getJSONObject(i).getString("url")}'> 
44                          ${breadcrumbJSONArray.getJSONObject(i).getString("title")} 
45                      </a> 
46                  </li> 
47              </#list> 
48            </#if> 
49            <li> 
50              <a href='${productJSONObject.getString("url")}'> 
51                Item final: ${productJSONObject.getString("title")} 
52              </a> 
53            </li> 
54          </#if> 
55          <li> 
56            ${navigationJSONObject.getJSONObject("self").getString("title")} 
57          </li> 
58        </ul> 
59      </div> 
60    </div> 
61	</div> 
62 
63  <div class="learn-article-nav-content"> 
64    <#if parentJSONObject?has_content && parentJSONObject.getString("url")?has_content> 
65      <div class="learn-article-nav-item learn-article-nav-parent p-3"> 
66        <div class="mr-2"> 
67          <a 
68            href='${parentJSONObject.getString("url")}'> 
69            <svg 
70              class="lexicon-icon lexicon-icon-angle-left" 
71              role="presentation" 
72              viewBox="0 0 512 512"> 
73              <use xlink:href="/o/admin-theme/images/clay/icons.svg#angle-left"></use> 
74            </svg> 
75          </a> 
76        </div> 
77        <span> 
78          ${parentJSONObject.getString("title")} 
79        </span> 
80      </div> 
81    </#if> 
82    <#if childrenJSONArray.length() gt 0> 
83      <ul class="m-0 p-2"> 
84        <#list 0..childrenJSONArray.length()-1 as i> 
85          <li class="learn-article-nav-item"> 
86            <a 
87              class='liferay-nav-item ${(navigationJSONObject.getJSONObject("self").url == childrenJSONArray.getJSONObject(i).url)?then("selected", "")}' 
88              href="${childrenJSONArray.getJSONObject(i).url}"> 
89              <span> 
90                ${childrenJSONArray.getJSONObject(i).getString("title")} 
91              </span> 
92            </a> 
93          </li> 
94        </#list> 
95      </ul> 
96      <#elseif siblingsJSONArray.length() gt 0> 
97        <ul class="m-0 p-2"> 
98          <#list 0..siblingsJSONArray.length()-1 as i> 
99            <li class="learn-article-nav-item"> 
100              <a 
101                class='liferay-nav-item ${(navigationJSONObject.getJSONObject("self").url == siblingsJSONArray.getJSONObject(i).url)?then("selected", "")}' 
102                href="${siblingsJSONArray.getJSONObject(i).url}"> 
103                <span> 
104                  ${siblingsJSONArray.getJSONObject(i).getString("title")} 
105                </span> 
106              </a> 
107            </li> 
108          </#list> 
109        </ul> 
110    </#if> 
111  </div> 
112</div> 
113<style> 
114  .learn-article-breadcrumb { 
115    display: flex; 
116    flex-wrap: wrap; 
117    gap: 2px; 
118
119 
120  .learn-article-breadcrumb li { 
121    font-size: 13px; 
122    color: #6C6C75; 
123    font-weight: 400; 
124
125 
126  .learn-article-breadcrumb li+li::before { 
127    content: "/"; 
128    padding: 0 8px; 
129
130</style> 

Using Product Options for Commerce 2.1 and Earlier Versions

Creating an Option Template

  1. Navigate to Control PanelCommerceProducts.

  2. Go to the Options tab. This displays a list of existing templates on the left and the Option Template Detail form on the right.

  3. Click Add (Add icon).

    Creating an option template.

  4. Click Save.

You can now apply this option template to products.

  1. (Optional) Enable the Use in Faceted Navigation toggle to use the option as a search filter for products.

  2. (Optional) Enable the SKU Contributor toggle to use the option’s values to create SKUs. Customers must select from the available option values.

Warning

You cannot use boolean as a SKU contributor. Attempting to do so shows the following warning message: SKU Contributor cannot be set as true for the selected Field Type.

Adding Option Values

Depending on the field type, you may need to create values for the option.

  1. Click Values next to the option.

  2. Click Add (Add icon) and enter details for the value.

    Adding values to the option.

  3. Click Save.

You can repeat these steps to add more values. The priority field determines the display order of the values with the lowest values displayed first.

Applying an Option Template to a Product

Once you apply a template to a product, you can make any changes to the product’s option. These changes will not affect the option template or any other product.

  1. Open the Global Menu (Global Menu), and navigate to CommerceProducts.

  2. Select a product and go to Options.

    Go to the Options tab of a product.

  3. Enter a name in the Add Options field, and click Create New. If there’s an option template already created, click Select.

This applies the option template to the product. If choosing an existing option template, all values from the template are included. You can select the option to add, remove, or edit values without affecting the template values.