I have two related questions. First, I am using this code:
<p>{exp:weblog:entries weblog="blog1|blog2|blog3|blog4|blog5" limit="5"}
{exp:query sql="SELECT blog_name FROM exp_weblogs WHERE weblog_id = '{weblog_id}' LIMIT 1"}
{blog_name}
{/exp:query}
{/exp:weblog:entries}</p>
and
<p>{exp:comment:entries sort="desc" orderby="date" limit="5" dynamic="off" weblog="blog1|blog2|blog3|blog4|blog5"}
{exp:query sql="SELECT blog_name FROM exp_weblogs WHERE weblog_id = '{weblog_id}' LIMIT 1"}
{blog_name}
{/exp:query}
{/exp:comment:entries}</p>
Why does the first example work as expected (it prints <p>blog1 blog2 blog3 blog1 blog5</p>), while the second example prints nothing?
My second question is: is there an easier way to retrieve the blog short name than using the Query module in these contexts? As far as I can tell I have access to {weblog} (the long name) and {weblog_id} (which I use above), but not something like {weblog_shortname}.
Thanks in advance for any help you can toss my way. You can IM me if you like.
