我正在使用Kentico 5.5R2作为我的网站,在那里我要生成GoogleNewsSitemap。到目前为止,我的代码能够获取newarticle URL和出版日期,但我不能够获取新闻文章的标题动态 这里的代码如何使用kentico CMS在GoogleNewsSitemap中获取新闻标题的标题
<url>
<loc><%# GetAbsoluteUrl(GetDocumentUrl()) %></loc>
<news:news>
<news:publication>
<news:name>Yourwellness </news:name>
<news:language>eng</news:language>
</news:publication>
<news:genres>PressRelease, Blog</news:genres>
<news:publication_date>
<%# GetDateTime("DocumentModifiedWhen", "dd-MMM-yy")%>
</news:publication_date>
<news:title>method for fetching title Comes here </news:title>
<news:keywords>Health</news:keywords>
</news:news>
</url>
我试过很多方法来获取冠军,但它作为空白。
我试过的eval方法,但它返回空值...的例如我试过这个'<![CDATA [<%#Eval(“NewsTitle”)%>]]> ' –
leroy