Orchard CMS - Remove Title and Metadata(published date) in a post

前端 未结 2 2017
眼角桃花
眼角桃花 2021-02-01 20:58


How do I remove the Title and Metadata(published data) in a post? Can this be done in Placement.info? I tried creating a custom content but doesn\'t look like a best solut

2条回答
  •  故里飘歌
    2021-02-01 21:09

    Alternatively, if you want to keep the title meta in the head whilst removing the title on every page create a Parts.Title.cshtml file in the view folder of your theme and then put

    @{
    Layout.Title = Model.Title;
    }
    

    which is exactly the same as the normal code except we remove the

    tag

    @{
    Layout.Title = Model.Title;
    }
    
    

    @Model.Title

提交回复
热议问题