We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to get articles using solospace tag

Development and Programming

f1india's avatar
f1india
5 posts
17 years ago
f1india's avatar f1india

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

  • Vikas

Mod Edit: Moved to the Modules General forum.

       
current's avatar
current
145 posts
17 years ago
current's avatar current

Hi Vikas,

That info is in the manual.

       
f1india's avatar
f1india
5 posts
17 years ago
f1india's avatar f1india

Hi,

Thanks for quick reply.

I have already seen that but i still cant figure out how to do that. can you please give me an example

  • Vikas
       
current's avatar
current
145 posts
17 years ago
current's avatar current

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

       
current's avatar
current
145 posts
17 years ago
current's avatar current

Solspace makes great add-ons but their documentation can be a bit short…

       
f1india's avatar
f1india
5 posts
17 years ago
f1india's avatar f1india

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.

  • Vikas
       
current's avatar
current
145 posts
17 years ago
current's avatar current

ah, nope, I’m a bit lost here.

       
f1india's avatar
f1india
5 posts
17 years ago
f1india's avatar f1india

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.

somehting like this

{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}”}

Related Entries

<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

  • Vikas
       
f1india's avatar
f1india
5 posts
17 years ago
f1india's avatar f1india

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}”}

Related Entries

<ul> <li>{entry_date format="%F %j, %Y"} <a href=”http://{path=">{title}</li> </ul> {/exp:tag:related_entries}

{/exp:weblog:entries}

       
current's avatar
current
145 posts
17 years ago
current's avatar current

I don’t know. i just played around with it until it worked. 😊 I think you should take your question to the Solspace Forum. This is definitely the wrong location to discuss this.

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
17 years ago
Robin Sowell's avatar Robin Sowell

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.)

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.