& lt#列表?測試地圖?鑰匙?作為?testKey & gt
& lt?選項?value="${testKey} "?& gt
${testMap.get(testKey)}
& lt/option & gt;
& lt/# list & gt;或者使用:
& lt#列表?testMap.keySet()?作為?testKey & gt
& lt?選項?value="${testKey} "?& gt
${testMap.get(testKey)}
& lt/option & gt;
& lt/# list & gt;請記住,在webwork附帶的freemarker中,映射中的鍵被定義為字符串(如果您想使用${Map[key]}來獲取值;如果使用${Map.get(key},則可以使用其他類型,如Map
& lt#列表?pager.map.get("m ")?作為?列表& gt
& lt李;#如果?(list_index?+?1)?%?4?==?0 & gt?class = " end " & lt/# if & gt;& gt
& lt答?href = " $ { base } $ { list . html file path } "?class="productImage "?target="_blank " >
& ltimg?src = " $ { base } $ {(list . product imagelist[0])。thumbnailProductImagePath)!system config . defaultthumbnailproductimagepath } "?alt="${list.name} "?/& gt;
& lt/a & gt;
& ltdiv?class="productTitle " >
& lt#如果?(list.name?長度?& lt?28)>
& lt答?href = " $ { base } $ { list . html file path } "?alt="${list.name} "?target="_blank " >$ { list.name } & lt/a & gt;
& lt# else & gt
& lt答?href = " $ { base } $ { list . html file path } "?alt="${list.name} "?target="_blank " >${list.name[0..25]}...& lt/a & gt;
& lt/# if & gt;
& lt/div & gt;
& ltdiv?class="productBottom " >
& ltdiv?class="productPrice " >
& lt跨度?class="price " >${list.price?string(priceCurrencyFormat)} & lt;/span>。
& lt跨度?class="marketPrice " >${list.marketPrice?string(priceCurrencyFormat)} & lt;/span>。
& lt/div & gt;
& ltdiv?class="productButton " >
& lt輸入?type="button "?name="addCartItemButton "?class="addCartItemButton?addCartItem?{id:?${list.id}'} "?& lt#如果?list.isOutOfStock & gtValue= "缺貨"?已禁用& lt# else & gtvalue = " purchase " # if & gt;?hidefocus="true "?/& gt;
& lt輸入?type="button "?name="addFavoriteButton "?class="addFavoriteButton?addFavorite?{id:?${list.id}'} "?Value= "收藏"?hidefocus="true "?/& gt;
& lt/div & gt;
& lt/div & gt;
& lt/李& gt
& lt/# list & gt;