Orchardcms Orchard CMS菜单项上的图像
如何在orchard中为我的导航项目添加图像?在我的orchard应用程序中,我添加了6个导航项。如何将图像添加到所有项目?不久前有一个类似的问题: 例如,您可以为MenuItemLink编写一个备选方案,并在其中添加图像 从另一个答案来看: MenuItemLink.cshtmlOrchardcms Orchard CMS菜单项上的图像,orchardcms,Orchardcms,如何在orchard中为我的导航项目添加图像?在我的orchard应用程序中,我添加了6个导航项。如何将图像添加到所有项目?不久前有一个类似的问题: 例如,您可以为MenuItemLink编写一个备选方案,并在其中添加图像 从另一个答案来看: MenuItemLink.cshtml <a href="@Model.Href" class="my-super-cool-custom-link"> <img src="wherever/img.jpg" />@Mod
<a href="@Model.Href" class="my-super-cool-custom-link">
<img src="wherever/img.jpg" />@Model.Text
</a>
不久前有一个类似的问题: 例如,您可以为MenuItemLink编写一个备选方案,并在其中添加图像 从另一个答案来看: MenuItemLink.cshtml
<a href="@Model.Href" class="my-super-cool-custom-link">
<img src="wherever/img.jpg" />@Model.Text
</a>
作为@Xceno回答的后续内容,这是我在需要此功能时所做的:
@{
var icon=Model.Content.ContentItem.MenuPart.icon.Value;
}
作为@Xceno回答的后续内容,这是我在需要此功能时所做的:
@{
var icon=Model.Content.ContentItem.MenuPart.icon.Value;
}
为什么-1回答这个问题?我能知道吗?为什么要回答这个问题?我能知道吗?