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

using tag_name in an if statement

Development and Programming

fyisite's avatar
fyisite
3 posts
16 years ago
fyisite's avatar fyisite

I am using the Tags module to show a tag cloud, and then go to details of the entries containing that tag.

I am trying to add detailed highlights for frequent tags. I have created a separate weblog (wlhilites), with one entry for each frequent tag, including a field for the tag (tagname), and a field for the summary (taghighlights).

Am trying to embed the summary as part of the template for tag results.

The following template command successfully displays the tag in the tag cloud users clicked on to go to the details_about_entries_with_that_tag page:

{exp:tag:tag_name}

However, nothing I have tried enables me to use that value within the weblog:entries statement I need to display the desired weblog field for the entry (there is one entry per tag)

Here is an example failed attempt (I have tried myriad variations:

{exp:weblog:entries weblog="wlhilites" tagname == tag:tag_name dynamic="off"}

{taghighlights}

{/exp:weblog:entries}

Thanks for any help you can provide.

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
16 years ago
John Henry Donovan's avatar John Henry Donovan

fyisite,

The Tag module is a third party module and as such, a parameter for it does not exist in the weblog module.

I am pretty sure you should be using the following approach.

Solspace Tag Docs: Tag 2.6 Entries

I am going to move this thread into the Modules: Discussion and Questions for you.

       
fyisite's avatar
fyisite
3 posts
16 years ago
fyisite's avatar fyisite

Thanks, John.

As I mentioned, I can cause the tag_name to show up when a template is rendered, through the command: {exp:tag:tag_name}

If only I could use that value…

Carrie

       
fyisite's avatar
fyisite
3 posts
16 years ago
fyisite's avatar fyisite

BTW, my tag cloud is working fine

http://www.investigaming.com/index/tags/

I just want to enhance what visitors see when they click on a word in the tag cloud, (e.g., http://www.investigaming.com/index/tag/children) by including research highlights (that I have written, and placed in a field in a weblog) before the list of tagged entries.

       

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.