2015-03-19 63 views
1

Sitecore SPEAK UI(7.5)中是否有一種方法將ListControlViewMode設置爲DetailList)設置爲包含帶圖像的列,另一列包含按鈕?Sitecore SPEAK UI配置ListControl以顯示圖標和按鈕

我創建了一個ListControl Parameters項目我PageSettings項下,並增加了一些ColumnField物品所需的列 - 但無法找到任何其他模板類型添加對不同類型的列中的數據。我也嘗試玩FormatterHTMLTemplate字段的ColumnField s,但我不確定這些是如何使用的。

回答

3

考慮按鈕意味着超鏈接。你可以嘗試添加在HTMLTemplate如下:

圖像:

<img src="{{YourImageSourceField}}" ..../> 

超鏈接:

<a href="{{YourLinkSrcField}}">{{YourLinkTextField}}</a> 

你也可以考慮閱讀Martina Welander Speak Series對這種自定義實現的一些信息。

+1

真的只是找到了說話分量參考的相關部分在同一時間..謝謝,這是我需要的。 – 2015-03-19 14:17:48

+0

@MatthewDresser對不起,我太遲了回覆:)很高興幫助你! – nsgocev 2015-03-19 14:19:02

1

我也通過設置ViewMode到TileList來使用ListView的自定義title屬性。然後使用Knockout將數據綁定到使用標準cshtml的自定義圖塊,如果這有什麼用處的話?

<div class="sc-tile-default" data-bind="attr: {id: Id}"> 
<div style="min-height: 98px;"> 
    <img width="112" data-bind="attr: {src: Path}" /> 
</div> 

<div class="sc-iconList-item-title"> 
    <span data-bind="text: Name"></span> 
</div> 

看到這個項目 https://github.com/sobek1985/WallpaperManager

List Control

+0

酷,這是一個很好的方法,因爲它避免了將太多的HTML標記填充到單行文本字段!我沒有看到一個ListView控件(在我的ListControl中,我沒有提到這些屬性,它們是否是新的Sitecore 8? – 2015-03-19 16:54:56

+1

只需在Sitecore 7.2站點上進行檢查就可以了只有Sitecore 7.x上的View模式是Detail List和Icon List,TitleList和CustomHelphiFile似乎是Sitecore 8的新功能,而不是Sitecore 7.5。對不起,我認爲該字段是7.5以上的版本。 – Komainu85 2015-03-20 12:12:47

+0

好的不用擔心,謝謝你的額外信息! – 2015-03-20 12:23:02

相關問題