夹层 CMS 中如何定义页面实例的 slug?
How is a page instance's slug defined in Mezzanine CMS?
By default the template pages/page.html is used, but if a custom template exists it will be used instead. The check for a custom template will first check for a template with the same name as the Page instance’s slug, and if not then a template with a name derived from the subclass model’s name is checked for. So given the above example the templates pages/dr-seuss.html and pages/author.html would be checked for respectively.
问题是 Mezzanine CMS 从哪里获取页面实例的 slug?是来自title属性吗?
默认情况下,slug 是从 title 属性自动生成的,但也可以从页面管理的元数据部分的 "URL" 选项手动设置。
By default the template pages/page.html is used, but if a custom template exists it will be used instead. The check for a custom template will first check for a template with the same name as the Page instance’s slug, and if not then a template with a name derived from the subclass model’s name is checked for. So given the above example the templates pages/dr-seuss.html and pages/author.html would be checked for respectively.
问题是 Mezzanine CMS 从哪里获取页面实例的 slug?是来自title属性吗?
默认情况下,slug 是从 title 属性自动生成的,但也可以从页面管理的元数据部分的 "URL" 选项手动设置。