HI, I have solspace tag module install & while posting entry i m adding tags to each & every entry.
Now my question is how can i search an article using those tag field dynamically like i have an template name latest news where i m getting the latest one article from news category. and i have another template named drivers where i want to show the article related to the tags associated with the news i m getting in latest news module.
Any help would be highly appreciated.
Thanks & Regards
Mod Edit: Moved to the Modules General forum.
On one page, you will have your entries with the tags attached:
{exp:weblog:entries ...}
{exp:tag:tags entry_id="{entry_id}" type="weblog" orderby="clicks" limit="10"}<a href="http://{path=site/tag}{websafe_tag}" title="{tag_name}">{tag}</a>{/exp:tag:tags}
{/exp:weblog:entries}
Then you have a page called tag and you include this:
{exp:tag:entries limit="1" ...}
{title} {body} {extended} ...
{/exp:tag:entries}
Hope that helps
Hi,
Thanks for your reply.
First of all i dont have two different page. I have two templates in the same page names news & drivers respectively. Now what i m doing is while posting the entry in news weblog and i m adding the tag to that entry like Honda, test etc. & have written the code to get the latest news from news weblog & this is working perfectly fine.
Now what i want is in my Drivers template i want the driver to be displayed from driver webblog depending upon the tag found in the news entry. so that means i have a news entry from news weblog & by using that entrys tag i want to search in drivers weblog & display the result.
I hope this will gonna give you a better understanding.
Basically what i m trying to do is i have two weblogs one i m using for news & the other one i m using for drivers & now wat i want is i want to display the drivers related to the tags i m adding in the news from drivers weblog.
basically something like using the news tag to search in drivers weblog & display the result.
{exp:weblog:entries weblog="f1news" limit="1"} {title} {article_author} {article_text} {entry_date format="%M %d, %Y"}
{exp:tag:tags entry_id="{entry_id}"}
<a href="http://{path=tags/tag}{websafe_tag}" title="{tag_name}">{tag_name}</a>
{/exp:tag:tags}
{exp:tag:related_entries weblog="f1news" tag="{tag_name}”}
<ul> <li>{entry_date format="%F %j, %Y"} <a href=”http://{path=">{title}</li> </ul> {/exp:tag:related_entries}
{/exp:weblog:entries}
=============
But this is not showing any result
Sorry the earlier code was wrong
This is the correct one
{exp:weblog:entries weblog="f1news" limit="1"} {title} {article_author} {article_text} {entry_date format="%M %d, %Y"}
{exp:tag:tags entry_id="{entry_id}"}
<a href="http://{path=tags/tag}{websafe_tag}" title="{tag_name}">{tag_name}</a>
{/exp:tag:tags}
{exp:tag:related_entries weblog="F1Teams" tag="{tag_name}”}
<ul> <li>{entry_date format="%F %j, %Y"} <a href=”http://{path=">{title}</li> </ul> {/exp:tag:related_entries}
{/exp:weblog:entries}
Hm- I have played with it- and use it on one site. Quite like it, but not as up on it as some things. I believe that tag should normally be used on a single entry page- one with the entry indicator in the url. And it shouldn’t be nested. Which is not to say it will totally bork if you do- but I’d get it working per the specs first. Also- if you have to nest it- try specifying the entry_id rather than the tag. So:
{exp:tag:related_entries weblog="F1Teams" entry_id="{entry_id}"}
But keep in mind- when you nest things, you can run into variable conflicts. So I won’t swear this will work. Of course- if it’s a true ‘single entry page’- just don’t nest it and it should be fine.
(ETA- but yep, since it’s third party, best place for questions will be the Solspace forum. EE doesn’t officially support 3rd party modules.)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.