This project is read-only.

Reacent list path error

Topics: Customizing Orchard
Dec 19, 2011 at 5:10 PM


My Article recent content list path is comming like below



I have create list.cshtml file inside my view folder like below


@using Orchard.Core.Contents.ViewModels;
@using Orchard.Utility.Extensions;

@using Orchard.DisplayManagement.Shapes;
    var list = Model;
    var items = list.Items;
    var count = items.Count;
    var listTag = Tag(list, "ul");
    <table class="items">  

    @foreach (var Article in items)
                 @Html.ActionLink((string)Article.Title,"Item","Articles", new { Article.ContentItem.Id })              

there is no routerpart in my actionlink, But how url comming with routerpart?

I want make this url like below



How can i make that?

Dec 19, 2011 at 5:14 PM

If Article is a ContentType, why not just use @Html.ItemDisplayLink?

Dec 20, 2011 at 4:22 AM



I have use this


I can see my reacent list, but when i click one of item its redirect to home page, its not display details of article





Dec 21, 2011 at 6:31 PM


Finally i had change my code like below

  Articles.As<RoutePart>().Path = Articles.As<RoutePart>().Slug;

Now my path issue is working