I can never seem to get the AND command working...this doesn't work:
<mt:Var name="starterlimit" value="999">
<mt:Var name="startercount" value="0">
<$mt:PageDataShortProductName setvar="short_product_name"$>
<mt:Entries tag="@starter AND $short_product_name" sort_by="field:entrypriority" sort_order="descend">
<mt:If name="startercount" lt="$starterlimit">
<mt:setvarblock name="startertitle"><a href="<$mt:EntryPermalink$>"><mt:EntryTitle></a></mt:setvarblock>
<mt:setvarblock name="starterlist{$startertitle}"><mt:EntryDataEntryPriority></mt:setvarblock>
<$mt:Var name="startercount" op="++" setvar="startercount"$>
</mt:EntryIfTagged>
</mt:If>
</mt:Entries>
This does:
<mt:Var name="starterlimit" value="999">
<mt:Var name="startercount" value="0">
<$mt:PageDataShortProductName setvar="short_product_name"$>
<mt:Entries tag="$short_product_name" sort_by="field:entrypriority" sort_order="descend">
<mt:If name="startercount" lt="$starterlimit">
<mt:EntryIfTagged tag="@starter">
<mt:setvarblock name="startertitle"><a href="<$mt:EntryPermalink$>"><mt:EntryTitle></a></mt:setvarblock>
<mt:setvarblock name="starterlist{$startertitle}"><mt:EntryDataEntryPriority></mt:setvarblock>
<$mt:Var name="startercount" op="++" setvar="startercount"$>
</mt:EntryIfTagged>
</mt:If>
</mt:Entries>
Reported on Movable Type 4.3
It might be that you cannot supply a regular tag AND a sticky tag at once.
Why aren't you simply using your second coding, which works?
I am using it...it's just frustrating not being able to use the simpler code. I'm trying to build product-specific stuff which relies on certain types of content combining with something that identifies the product e.g. @starter AND $product or $FAQ AND $product.
Hopefully somebody might be able to confirm what affect the sticky tag or local variable has, if any, on tag="" constructs...
You might find this posting interesting:
http://www.movabletips.com/2010/06/combining-tag-attributes-and-or-and-variables-in-movable-type.html
(If you build the entire argument inside a 'setvarblock' tag first, then you can easily use the resulting variable as the argument. It might not be 100% elegant but at least all your selections will happen in one line of code which makes it easier to see what you are filtering for.)
Very interesting - thanks for the link and confirmation.
Will try and post my updated code for future code-stumblers like myself.