Okay, I’ve got FeedX up and running, and it’s working fantastically so far, but I’m trying to work out how to do a few more things with it.
Here is an example of the feed I’m using:
http://ulpd.leeds.ac.uk/ulpd/template/file1.xml?PersonID=409
It is basically a feed of academic publications by a particular author. The key element in here is the PublicationType tag. It can hold three different values: Journal, Chapter or Book.
Right now, I’m using the following call to select all of the entries tagged Journal:
[!FeedX? &url=`http://ulpd.leeds.ac.uk/ulpd/template/file1.xml|xq|PersonID|xe|409` &filterElements=`PUBLICATIONVIEW(PUBLICATIONTYPE NE /Journal/)` &preset=`publicationsJournal` &cacheType=`1`!]
My templates within the publicationsJournal preset are:
outer.tpl
inner.tpl
<h3>Journal Articles</h3>
<ul>
{{PUBLICATIONVIEW->publication}}
</ul>
publication.tpl
<li>[+AUTHORS+] ([+YEARPUB+]) [+TITLE+]. <em>[+PUBIN+]</em>[+VOLUME:isnt:then=`, <strong>[+VOLUME+]</strong>`+][+PAGES:isnt:then=`, [+PAGES+]`+].</li>
My questions are these:
Firstly, can I do the filtering within the inner.tpl, for example, rather than in the actual snippet call. It would be useful to be able to have something like:
inner.tpl
<h3>Journal Articles</h3>
<ul>
{{PUBLICATIONVIEW(filter to give me items with tag Journal)->publication}}
</ul>
<h3>Books</h3>
<ul>
{{PUBLICATIONVIEW(filter to give me items with tag Book)->publication}}
</ul>
<h3>Chapters</h3>
<ul>
{{PUBLICATIONVIEW(filter to give me items with tag Chapter)->publication}}
</ul>
rather than having to call the snippet and process the feed three times.
Secondly, is there any way I could rewrite this so that the html being inserted around the {{PUBLICATIONVIEW->publication}} is only displayed if there are any results that match the appropriate filter?