你如何强迫WeBlog将博客文章重新排序为新的文件夹结构?

时间:2016-03-11 16:22:13

标签: sitecore weblog

基础WeBlog配置包含以下节点:

<event name="item:saved">
    <handler type="Sitecore.Sharedsource.Tasks.NewsMover, Sitecore.Sharedsource.NewsMover" method="OnItemSaved">
        <database>master</database>
        <templates hint="raw:AddTemplateConfiguration">
            <template id="Modules/WeBlog/BlogEntry" sort="Descending">
                <DateField>Entry Date</DateField>
                <YearTemplate formatString="yyyy">Common/Folder</YearTemplate>
                <MonthTemplate formatString="MMMM">Common/Folder</MonthTemplate>
                <!-- Uncomment the following line if you have too many posts per month (more than 100) -->
                <!--<DayTemplate formatString="dd">Common/Folder</DayTemplate>-->
            </template>
        </templates>
    </handler>
    <!-- Keep the post and comment handlers seperate to ensure comments are structured below posts and not within the same folder structure as posts -->
    <handler type="Sitecore.Sharedsource.Tasks.NewsMover, Sitecore.Sharedsource.NewsMover" method="OnItemSaved" use="comments">
        <database>master</database>
        <templates hint="raw:AddTemplateConfiguration">
            <template id="Modules/WeBlog/BlogComment" sort="Descending">
                <DateField>__created</DateField>
                <YearTemplate formatString="yyyy">Common/Folder</YearTemplate>
                <MonthTemplate formatString="MMMM">Common/Folder</MonthTemplate>
                <!-- Uncomment the following line if you have too many posts per month (more than 100) -->
                <!--<DayTemplate formatString="dd">Common/Folder</DayTemplate>-->
            </template>
        </templates>
    </handler>
    <handler type="Sitecore.Modules.WeBlog.Globalization.ItemAndPublishEventHandler, Sitecore.Modules.WeBlog" method="OnItemSaved"/>
</event>

如果对BlogEntries取消注释以下行,您如何强制WeBlog将现有博客帖子重新排序到正确的文件夹(现在包含日期文件夹)?

<DayTemplate formatString="dd">Common/Folder</DayTemplate>

目前使用Sitecore 7.1和WeBlog 5.3。

0 个答案:

没有答案