是否可以通过在Orchard CMS中使用Id显示TextWidget?

时间:2019-01-03 04:02:15

标签: asp.net-mvc orchardcms-1.8

我在我的网站上创建了一个新区域,让我们说“ BottomArea”,因此在BottomArea中包含:

  1. 方框A(TextWidget)
  2. 框B(TextWidget)
  3. 方框C(最近的博客文章)
  4. Box D(TextWidget)

如果区域中有1个TextWidget,我可以这样:

string text1 = Model.Content.Items[0].ContentItem.TextWidget.Text1.Value; 

但是如果我在1个区域中有多个TextWidget,则无法以相同的方式进行操作

现在它显示所有TextWidget,所以我想按ID显示TextWidget,并从每个ID获取归档的文本。

0 个答案:

没有答案