0

基本的 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 将现有的博客文章重新排序到正确的文件夹中(现在包含一个 day 文件夹)?

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

目前使用 Sitecore 7.1 和 WeBlog 5.3。

4

0 回答 0