0

我还是果园的新手。

我有两种内容类型定义如下

public int Create() {
            // Define the tab list type which will
            // contain body details, common, route, menu and be a container
            ContentDefinitionManager.AlterTypeDefinition("TabList",
                cfg => cfg
                    .WithPart("BodyPart")
                    .WithPart("CommonPart")
                    .WithPart("RoutePart")
                    .WithPart("MenuPart")
                    .WithPart("ContainerPart")
                    .Creatable());

            // Define the tab type which will
            // contain body details, common, be containable.
            ContentDefinitionManager.AlterTypeDefinition("Tab",
                cfg => cfg
                    .WithPart("BodyPart")
                    .WithPart("TitlePart")
                    .WithPart("CommonPart")
                    .WithPart("ContainablePart")
                    .Creatable());
            return 1;
        }

我正在尝试将模块中的列表标记渲染从:

<ul>
<li>...content-item</li>
...
</ul>

<ul>
<li>content-item.Title</li>
...
</ul>
<ul>
<li>content-item.Body</li>
...
</ul>

而且我只希望仅针对此模块更改列表呈现。

有人可以指点我一个方向吗?

4

1 回答 1

1

阅读这个:http ://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx和这个:http ://weblogs.asp.net/bleroy /archive/2011/05/23/orchard-list-customization-first-item-template.aspx

于 2012-06-01T23:29:10.293 回答