Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In umbraco 4.7.1 I created a list of images according to the code below:
@{ dynamic mediaItem = new DynamicMedia(1056); <ul id="slides"> @foreach (var item in @mediaItem.Children ) { var t = @item.umbracoFile; int id = Convert.ToInt32(@item.urlSlide); <li><a href="@library.NiceUrl(id)"><img src="@item.umbracoFile" alt="@item.tituloSlide" /></a></li> } </ul>}
How to do it in umbraco 5?
thanks
Take a look at the DevDataset sample that you can choose when installing Umb 5. From that, I got:
@{ var sliderItems = Model.DescendantContent() .Where(x => x.ContentType.Alias == "sliderItem") .OrderBy(x => x.SortOrder);}@foreach (var sliderItem in sliderItems){ <li class="slider"> <a href="@sliderItem.NiceUrl()">@sliderItem.Field("title")</a> <a class="thumb" href="@Umbraco.GetMediaUrl(sliderItem.Id, "image")" title=""> <img src="@Umbraco.GetMediaUrl(sliderItem.Id, "image")" width="50" height="35" alt="" /> </a> </li>}
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
list of images in umbraco 5
In umbraco 4.7.1 I created a list of images according to the code below:
@{
dynamic mediaItem = new DynamicMedia(1056);
<ul id="slides">
@foreach (var item in @mediaItem.Children ) {
var t = @item.umbracoFile;
int id = Convert.ToInt32(@item.urlSlide);
<li><a href="@library.NiceUrl(id)"><img src="@item.umbracoFile" alt="@item.tituloSlide" /></a></li>
}
</ul>
}
How to do it in umbraco 5?
thanks
Take a look at the DevDataset sample that you can choose when installing Umb 5. From that, I got:
is working on a reply...