我正在使用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