Plugin Contributor
Jason
(@verysimple)
currently it’s a hard-coded amount to keep things simple. I’ve thought about changing it to unlimited templates. i’d be curious to know some things that you are doing with hungryfeed and the templates?
thanx..
well i’ve used some RSS feeds, and sometimes i need only certain element from each one of them, and if i’m not mistaken i can only do so by playing with the template, right?
i can mashup the feed by using yahoopipes, but i think hungryFEED is a lot easier 🙂
Plugin Contributor
Jason
(@verysimple)
yea, really i should have unlimited templates, but it just will add a tiny bit more complexity to HungryFEED. eventually i will get that in there once my real work calms down a bit.
if you are getting certain elements from the description using the “select” functionality then the template is the best way. It may be possible sometimes to do it with CSS as well, but it depends on the feed.
Plugin Contributor
Jason
(@verysimple)
version 1.5.8 will be available soon (wordpress svn server is acting flakey, but it should be up soon). With that you can create “sub-templates” by using conditional logic in the template (which uses Mustache).
Here’s an example for template 1:
{{#option_a}}
... option a code here
{{/option_a}}
{{#option_b}}
... option b code here
{{/option_b}}
{{#option_c}}
... option c code here
{{/option_c}}
{{^option_a}}
... code that will show for everything *except* option a
{{/option_a}}
then in your shortcode you specify template 1, and pass through a parameter to the template to indicate which option you want. You can create as many options as you want, which means you can technically create as many template and variations as you want using your own shortcode parameters:
// this would show only option a code
[hungryfeed url="..." template="1" option_a="true"]
// this would show only option b code
[hungryfeed url="..." template="1" option_b="true"]
// this would show both option b and option c, but not option a code
[hungryfeed url="..." template="1" option_b="true" option_c="true"]
“option_a” is not a significant parameter name, hungryfeed just passes through all parameters to the template so you can use whatever parameter names you want. (as long as it isn’t one of the reserved parameter names like “url”)