我正在使用Sitecore 7.2和weblog 2.3。
我有一个有几个条目的博客,这些帖子显示得很好。我正在尝试创建一个自定义模板"CustomEntry“,它继承了"Entry”
我遵循了链接https://github.com/WeTeam/WeBlog/wiki/Template-Settings中的所有步骤。这个博客现在完全是空的。调试时,GetBlogEntries()似乎是空的。我相信这是与指数有关的问题。有几件事我不清楚。
<locations hint="list:AddCrawler">
<master type="Sitecore.Modules.WeBlog.Search.Crawlers.DatabaseCrawler,Sitecore.Modules.WeBlog">
<include hint="list:IncludeTemplate" entryTemplate="$(EntryTemplateID)" commentTemplate="$(CommentTemplateID)">
<myEntry>{D5608C5D-45E4-43FA-B2E4-DCD9DDF3E5A1}</myEntry>
<myComment>{C85123CF-DA89-4C37-ACFA-4F8BA5157AC1}</myComment>
</include>
</master>
<web type="Sitecore.Modules.WeBlog.Search.Crawlers.DatabaseCrawler,Sitecore.Modules.WeBlog">
<include hint="list:IncludeTemplate" entryTemplate="$(EntryTemplateID)" commentTemplate="$(CommentTemplateID)">
<myEntry>{D5608C5D-45E4-43FA-B2E4-DCD9DDF3E5A1}</myEntry>
<myComment>{C85123CF-DA89-4C37-ACFA-4F8BA5157AC1}</myComment>
</include>
</web>
</locations>发布于 2015-04-21 13:04:32
是的,您应该创建3个模板,每个模板将从BlogEntry、BlogCategory或BlogComment继承:
/sitecore/templates/Modules/WeBlog/BlogEntry /sitecore/templates/Modules/WeBlog/BlogCategory /sitecore/templates/Modules/WeBlog/BlogComment
片段中列出的设置用于在主索引和web索引上设置的搜索索引。
这些设置应该是从内置模板继承的新模板的模板ID。标签"myEntry“或"myComment”的名称可以任意命名,只有Guid才能从这些标记中读取。
<myEntry>{D5608C5D-45E4-43FA-B2E4-DCD9DDF3E5A1}</myEntry>
<myComment>{C85123CF-DA89-4C37-ACFA-4F8BA5157AC1}</myComment>我将尝试重新构建名为weBlog的搜索索引,以查看这是否解决了问题。
您必须确保基于您创建的新模板发布的博客条目。
您可以使用luk-https://code.google.com/p/luke/来检查Sitecore索引/数据/索引,以查看是否在索引中获取博客条目。
https://stackoverflow.com/questions/29762517
复制相似问题