expressodev / twitter_search

Twitter Search 2 plugin for ExpressionEngine 2.x
15 stars 2 forks source link

Count variables? #4

Closed ajp closed 12 years ago

ajp commented 12 years ago

Are count and total_results variables available for use?

amacneil commented 12 years ago

I don't think so. It would be fairly trivial to add if you need it though?

ajp commented 12 years ago

I just had a site where if there are no tweets for a given persons user name, we don't want to show a header and opening ul tag. Would using {count} and {total_results} to show/hide the open/closing tags if they were available.

amacneil commented 12 years ago

I tested this and {count} and {total_results} work fine for me, but probably this wouldn't work inside a channel entries loop due to variable name clashes. To solve this I have added a var_prefix="" parameter which allows you to prefix your variables, for example var_prefix="tweet" and then {tweet:count} and {tweet:text}. Can you try downloading the latest version from https://github.com/expressodev/twitter_search/zipball/master and see whether this works for you?

ajp commented 12 years ago

I'll test it out and let you know what I find.

Thanks for the work!

ajp commented 12 years ago

Seems to work as advertised. Thanks!