EE默认RSS模板(固定)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EE默认RSS模板(固定)相关的知识,希望对你有一定的参考价值。

This template removes seconds from date fields used in the which cause multi-posting (on each edit) of entries. These are the minimal fixes to the current default EE RSS Template, I've also uploaded an [improved template](http://snipplr.com/view/25354/ee-rss-template-improved/ ) as well. For more information see my blog post (url above)
  1. {assign_variable:master_weblog_name="blog"}
  2. {assign_variable:master_weblog_status="open"}
  3. {exp:rss:feed weblog="{master_weblog_name}" status="{master_weblog_status}"}
  4.  
  5. <?xml version="1.0" encoding="{encoding}"?>
  6. <rss version="2.0"
  7. xmlns:dc="http://purl.org/dc/elements/1.1/"
  8. xmlns:admin="http://webns.net/mvcb/"
  9. xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  10. <channel>
  11. <title>{exp:xml_encode}{weblog_name}{/exp:xml_encode}</title>
  12. <link>{weblog_url}</link>
  13. <description>{weblog_description}</description>
  14. <dc:language>{weblog_language}</dc:language>
  15. <dc:creator>{email}</dc:creator>
  16. <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
  17. <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
  18. <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
  19. {exp:weblog:entries weblog="{master_weblog_name}" limit="10" rdf="off" dynamic_start="on" disable="member_data|trackbacks" status="{master_weblog_status}"}
  20. <item>
  21. <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
  22. <link>{title_permalink=site/index}</link>
  23. <guid isPermaLink="false">{title_permalink=site/index}#When:{gmt_entry_date format="%H:%iZ"}</guid>
  24. <description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</description>
  25. <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
  26. <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i%Q"}</dc:date>
  27. </item>
  28. {/exp:weblog:entries}
  29. </channel>
  30. </rss>
  31. {/exp:rss:feed}

以上是关于EE默认RSS模板(固定)的主要内容,如果未能解决你的问题,请参考以下文章

Flask模板宏的概念和基本使用

BootStrap有用代码片段(持续总结)

在 Android Studio 的默认导航抽屉模板中使用按钮在片段之间切换

如何设置word固定格式模板

帝国cms如何生成rss,还有网站地图

一个易于使用的rss插件,用于带有模板的jquery。