Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8813411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:50:36+00:00 2026-06-14T03:50:36+00:00

Imagine I have a content type that has two fields of type category: one

  • 0

Imagine I have a content type that has two fields of type category: one is a taxonomy Author and another one is a taxonomy Topics, these two taxonomies are unrelated, the only ‘thing’ they may have in common is the component itself.

Now we go to the website as a visitor, then when the visitor clicks on a given Author I want to create a list with all the Topics that are present in Components that also contain the specific Author.

I know I could create a query object with a criteria containing both keywords from the different taxonomies to check if it retrieves any values, the problem is that I would need to do that for every single topic i.e. Author and Topic1, Author and Topic2, Author and Topic 3 etc, in the end it may mean tens of queries which I obviously don’t want to do.

As I see it the taxonomy API won’t help because both taxonomies and thefore their keywords are completely unrelated. Any alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:50:38+00:00Added an answer on June 14, 2026 at 3:50 am

    Based on the comment by Ram G and therefore taking as starting point the code example in live content, I have verified that the following solution works:

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Tridion.ContentDelivery.Taxonomies;
    using Tridion.ContentDelivery.DynamicContent.Query;
    using Tridion.ContentDelivery.DynamicContent;
    
    namespace Asier.Web.UI
    {
        public class TagCloud : System.Web.UI.WebControls.WebControl
        {
            protected override void Render(HtmlTextWriter writer)
            {
                TaxonomyRelationManager relationManager = new TaxonomyRelationManager();
                TaxonomyFactory taxFactory = new TaxonomyFactory();
    
                string taxonomyUriWhichIWantTheKeywordsFrom = "tcm:69-265-512";
    
                String[] componentUris = GetComponentUris();
                String[] contextKeywordUris = GetKeywordUris();
                Keyword[] contextKeywordArray = GetKeywordsFromKeywordUris(taxFactory, contextKeywordUris);
                Keyword[] cloudFacets = relationManager.GetTaxonomyKeywords(taxonomyUriWhichIWantTheKeywordsFrom, componentUris, contextKeywordArray, new CompositeFilter(), 16);
    
                ProcessKeywords(cloudFacets);
            }
    
            private static string[] GetComponentUris()
            {
                // This should probably be replaced with a Query object that
                // retrieves the URIs dynamically 
                return new String[] { "tcm:69-3645-16", "tcm:69-3648-16", "tcm:69-3651-16" };
            }
    
            private static string[] GetKeywordUris()
            {
                // this should probably be passed in as a property of the control
                return new string[] { "tcm:69-3078-1024" };
            }
    
            private static Keyword[] GetKeywordsFromKeywordUris(TaxonomyFactory taxFactory, String[] contextKeywordUris)
            {
                Keyword[] contextKeywordArray = new Keyword[contextKeywordUris.Length];
    
                for (int i = 0; i < contextKeywordUris.Length; i++)
                {
                    contextKeywordArray[i] = taxFactory.GetTaxonomyKeyword(contextKeywordUris[i]);
                }
    
                return contextKeywordArray;
            }        
    
            private static void ProcessKeywords(Keyword[] cloudFacets)
            {
                for (int i = 0; i < cloudFacets.GetLength(0); i++)
                {
    
                    if (cloudFacets[i].ReferencedContentCount > 0)
                    {
                        // Do whatever...
                    }
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine you have an entity that has some relations with other entities and you
Imagine we have a server side application that generates streaming content full of JavaScript
Imagine you have two views with code like the following: controller_a/a.html.erb <%= content_tag(:div) do
Imagine you have class A which has code which runs as method M. And
Imagine I have a cell that I want to be red if the value
I have a basic cms that loads content into pages that have mustache tags
Imagine I have following table: NAME DATE OTHER_CONTANT 'A' '2012-06-05' 'baz' 'A' '2012-06-04' 'bar'
Imagine I have the following code (simplified regarding my real context of course): <div
Imagine you have 2 databases : xpto & zpto. I want to do a
Imagine I have a boolean and a string attribute on my model with data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.