Skip to content

Alias (OrchardCore.Alias)

别名(OrchardCore.Alias)

This module allows you to specify friendly identifiers for your content items.

此模块允许您为内容项指定友好标识符。

Aliases can also be imported and exported, which means that they are persisted when running recipes or deploying content (whereas content item IDs are not).

别名也可以导入和导出,这意味着它们在运行配方或部署内容时是持久的(而内容项ID不是)。

Alias Part

别名部分

Attach this part to a content type to specify aliases for your content items.

将此部分附加到内容类型以指定内容项的别名。

Liquid

液体

With Alias enabled, you can retrieve content by alias in your liquid views and templates:

启用别名后,您可以在液体视图和模板中按别名检索内容:


{% assign my_content = Content["alias:footer-widget"] %}

 <font color=#0099ff size=4 face="黑体">{%assign my_content = Content [“alias:footer-widget”]%}</font> 


or

要么


{% assign my_content = Content.Alias["footer-widget"] %}

 <font color=#0099ff size=4 face="黑体">{%assign my_content = Content.Alias [“footer-widget”]%}</font>