diff options
author | dakkar <dakkar@luxion> | 2009-01-07 12:51:13 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2009-01-07 12:51:13 +0000 |
commit | 8d25800c67ad65defd98771bba2331ee64104f98 (patch) | |
tree | 622f61a0c5609c61904d9da3a6ab4b8db6688a24 /t/test-site/src/common/base-feed.tt | |
parent | a parte i namespace sbagliati, direi che i feed possono andare bene (diff) | |
download | WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.tar.gz WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.tar.bz2 WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.zip |
feed fatti, e pure col test
manca: testare feed intl, fare feed dei tag, mettere i tag nei feed
git-svn-id: svn://luxion/repos/WebCoso/trunk@402 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't/test-site/src/common/base-feed.tt')
-rw-r--r-- | t/test-site/src/common/base-feed.tt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/test-site/src/common/base-feed.tt b/t/test-site/src/common/base-feed.tt new file mode 100644 index 0000000..e2669e3 --- /dev/null +++ b/t/test-site/src/common/base-feed.tt @@ -0,0 +1,18 @@ +[% USE df = DateTime::Format('DateTime::Format::Strptime', + { pattern => '%FT%T%z', + locale => 'en_US', + time_zone => 'GMT' }) -%] +[% USE Dumper -%] +[% docs=changed.nsortf('last_change') -%] +<?xml version="1.0" encoding="utf-8"?> +<a:feed xmlns:a="http://www.w3.org/2005/Atom"> +<a:updated>[% l=docs.last;df.format(changed.$l.last_change) %]</a:updated> +[% FOR doc IN docs; NEXT UNLESS isLang(language,doc) -%] +<a:entry> + [% IF changed.$doc.creation %]<a:published>[% df.format(changed.$doc.creation) %]</a:published>[% END %] + [% IF changed.$doc.last_change %]<a:updated>[% df.format(changed.$doc.last_change) %]</a:updated>[% END %] + <a:id>[% atomIdFor(language,doc,path) %]</a:id> + <a:PH>[% dstUriFor(doc,path) %]</a:PH> +</a:entry> +[% END -%] +</a:feed> |