Does exp:tag:entries evaluate the category in the URL? 
Posted: 22 May 2008 02:48 PM   [ Ignore ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

Hi,
shouldn’t exp:tag:entries automatically pull the current category from the URL if no category is defined as a parameter?

http://www.domain.com/index.php/templategroup/mytemplate/C5/tag/Hotels%20&%20Motels

I’m expecting that it would only display entries that have the tag and belong to the category_id 5. Is my assumption correct and what can I do to let exp:entries:tag use the current category?
This is the line I’m using and it’s not using the category and just displays every entry that matches the tag.

{exp:tag:entries weblog="articles" inclusive="yes" orderby="entry_date" sort="asc" limit="20"}

I’m using Tag 2.1.1 build 20080418 with EE 1.6.3 build 20080421

Profile
 
 
Posted: 23 May 2008 06:30 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

eexperience,

Try adding this to your Tag:Entries loop: smile

category="{segment_3}"

 Signature 
Profile
 
 
Posted: 23 May 2008 06:41 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

Hi,
if I add that all results disappear. Does the Tag Module handle the “C” in segment_3? If I add a category id manually in the code like category="5" it works. But I need a way to dynamically evaluate the category.

Profile
 
 
Posted: 23 May 2008 06:46 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Hmmmm…

I thought I remember Mitchell adding a function that stripped the C from the URL for the Category parameter… it could have been a different module though rasberry

Let me look further into this smile

 Signature 
Profile
 
 
Posted: 23 May 2008 06:49 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

I think think the most obvious behavior would be if it acted like the exp:weblog tag which automatically evaluates an active category if not specified otherwise.

Profile
 
 
Posted: 23 May 2008 06:50 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Haha, yeah, but that’d be too easy.... we want you to wrestle with this module a bit, haha LOL

 Signature 
Profile
 
 
Posted: 23 May 2008 07:01 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

Maybe you want to mention that in the documentation too? wink

Profile
 
 
Posted: 23 May 2008 07:08 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

hehe LOL

So it seems this functionality was added for the Tag Cloud, not for Tag Entries.
I’m not sure why it’s not included for Tag Entries… it would certainly make sense, but I’m sure there’s a good reason. Mitchell doesn’t like to cut corners wink
It could perhaps be that it gets tricky with 2 “indictators” in the URL - the Tag and the Category.

Whatever the case, I will queue this up to be added for a future release smile

I apologize for any inconvenience…

 Signature 
Profile
 
 
Posted: 23 May 2008 07:15 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

That’s pretty bad since it stops my whole project, I’m relying on having a category matched together with the tag. Especially since it’s supported only not evaluated. Is there really no way to get the category id for the module?

Profile
 
 
Posted: 23 May 2008 07:23 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

I’ll slap Mitchell around a bit and see if he can provide a temp solution smile

 Signature 
Profile
 
 
Posted: 23 May 2008 07:30 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

I would appreciate any help, since this is really crucial for my project and it’s the whole purpose why I bought the Tag module, since EE itself isn’t able to deliver only the entries that match two different categories. I’m using the Tag module to solve this problem.

Profile
 
 
Posted: 23 May 2008 09:14 AM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

Hi,
looks like I’ve found a temporary solution, I still hope that you guys can come up with something better, but at least it helps me to get going.

I’m using PHP parsing on input for my templates and this piece of code. There are probably more elegant solutions, but since I know little to nothing about PHP this is the best I could come up with.

category="<?php echo substr("{segment_3}",1); ?>"

Profile
 
 
Posted: 17 October 2008 07:07 AM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

This is now available with the new version of Tag 2.5 smile
http://www.solspace.com/forums/viewthread/661/

 Signature 
Profile
 
 
Posted: 17 October 2008 09:55 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  10
Joined  2008-05-21

Thanks, I really appreciate that!

Pie Man - 17 October 2008 07:07 AM

This is now available with the new version of Tag 2.5 smile
http://www.solspace.com/forums/viewthread/661/

Profile