diff options
author | dakkar <dakkar@luxion> | 2009-01-07 14:11:50 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2009-01-07 14:11:50 +0000 |
commit | 6ef2ff64a7489335489be54495d47d0ca232b937 (patch) | |
tree | 0b02c116dace706065712e8214e8b6256e5de1a7 /t | |
parent | messi i tag / category nel feed (diff) | |
download | WebCoso-6ef2ff64a7489335489be54495d47d0ca232b937.tar.gz WebCoso-6ef2ff64a7489335489be54495d47d0ca232b937.tar.bz2 WebCoso-6ef2ff64a7489335489be54495d47d0ca232b937.zip |
pulizia dei path, ma non va proprio bene
git-svn-id: svn://luxion/repos/WebCoso/trunk@404 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't')
-rw-r--r-- | t/test-site/src/common/base-feed.tt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/t/test-site/src/common/base-feed.tt b/t/test-site/src/common/base-feed.tt index e2669e3..2559f29 100644 --- a/t/test-site/src/common/base-feed.tt +++ b/t/test-site/src/common/base-feed.tt @@ -4,15 +4,23 @@ time_zone => 'GMT' }) -%] [% USE Dumper -%] [% docs=changed.nsortf('last_change') -%] +[% tag='';IF (matches = path.match('^(?:.*/)?tags/(.*)$')); tag = matches.0; END -%] <?xml version="1.0" encoding="utf-8"?> <a:feed xmlns:a="http://www.w3.org/2005/Atom"> +<a:tag>[% tag %] ( [% path %] )</a:tag> <a:updated>[% l=docs.last;df.format(changed.$l.last_change) %]</a:updated> [% FOR doc IN docs; NEXT UNLESS isLang(language,doc) -%] +[% IF tag; + doc_duxml=typedAs(doc,'du.xml'); + IF tagged.$tag.grep(doc_duxml).size == 0; # bad regex... + NEXT; + END; + END -%] <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:id>[% atomIdFor(language,filename,dstUriFor(doc,filename)) %]</a:id> + <a:PH>[% dstUriFor(doc,filename) %]</a:PH> </a:entry> [% END -%] </a:feed> |