Pulling entries with more than one tag via the “tag=tag1|tag2” hardcode method
Posted: 09 May 2008 10:21 AM   [ Ignore ]
Newbie
Avatar
Rank
Total Posts:  7
Joined  2008-04-28

When pulling tag entries via the hardcode method…

{exp:tag:entries tag="myTag1|myTag2"}

{/exp:tag:entries}

This seems to be pulling the entries as “myTag1 or myTag2”.  That is, if myTag1 is not in the entry, all the myTag2 entries are still pulled.  I would like to have is pull the entries and “myTag1 AND myTag2”.

Is this possible.  tag="myTag1&myTag2;" does not seem to work.

thanks…

Profile
 
 
Posted: 09 May 2008 01:27 PM   [ Ignore ]   [ # 1 ]
Newbie
Avatar
Rank
Total Posts:  7
Joined  2008-04-28

OK I found my problem.  Using tag="mytag1|mytag2" does require that both tags be included in the entry. 

However, if “myTag1” does not exist in any entries, then it will still pull all entries with “myTag2”.  So I have to make sure that the tag’s I’m attempting to pull exist in at least one entry. 

Is this a bug?  I would think it should not pull the entry if it does not contain both tags, even if the said tag may yet be assigned to a weblog.

Profile
 
 
Posted: 12 May 2008 06:09 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

proee,

That’s a good catch! wink

I’ll queue up this bug for the next release

Thank you smile

 Signature 
Profile