1

Is there a way in Sitecore SPEAK UI (7.5) to configure a ListControl (ViewMode set to DetailList) to contain a column with images, and another column containing buttons?

I've created a ListControl Parameters item beneath my PageSettings item and have added a few ColumnField items for the required columns - but cant find any other template types to add for different types of column data. I've also tried playing around with the Formatter and HTMLTemplate fields of the ColumnFields but am not sure how these are meant to be used.

4

2 回答 2

3

Considering button means hyperlink. You can try adding the following in the HTMLTemplate:

For Image:

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

For Hyperlink:

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

You can also consider reading Martina Welander Speak Series for some information on this kind of custom implementations.

于 2015-03-19T14:03:54.923 回答
1

I've also used the custom title property of the ListView by setting ViewMode to TileList. Then used Knockout to databind to a custom tile using standard cshtml, if this is any use?

<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>

See this project https://github.com/sobek1985/WallpaperManager

List Control

于 2015-03-19T15:59:44.500 回答