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 8908833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:17:01+00:00 2026-06-15T03:17:01+00:00

I’m trying to render all component presentations from the broker database with a certain

  • 0

I’m trying to render all component presentations from the broker database with a certain component template. Here’s the query code so far:

using Tridion.ContentDelivery.DynamicContent;
using Tridion.ContentDelivery.DynamicContent.Query;

ItemTemplateCriteria CTCriteria = new ItemTemplateCriteria(1111);
PublicationCriteria pubCriteria = new PublicationCriteria(10);
AndCriteria finalCriteria = new AndCriteria(pubCriteria, CTCriteria);

Response.Write("<h1>START</h1>");

Query q = new Query();
q.Criteria = finalCriteria;

string[] result = q.ExecuteQuery();

if (result != null && result.Length > 0)
{
    foreach (string r in result)
    {
        Response.Write("<h1>" + r + "</h1>");
    }
}
else {
    Response.Write("Result is null or 0-length.");
}
Response.Write("<h1>END</h1>");

I keep getting null results. I do have dynamic content publishing setup in cd_storage_conf.xml and a few component presentations published in the Broker database.

My understanding from this document is that, I should be able to retrieve related component URIs using this approach.

My Questions:

  1. Is my understanding of the capabilities of the Query class correct?
  2. Did I miss anything, config and code-wise?
  3. Is there any other way of retrieving broker content by component template?

EDIT:

Additional info: Regarding ItemTemplateCriteria, I only assumed that this is used for searching records by Component Template. I assumed because there is another criteria class called PageTemplateCriteria. Please correct me if this assumption is invalid.

EDIT:

Additional info: I’ve inspected the COMPONENTS, SCHEMA and TEMPLATES tables in the broker database but didn’t find the published components there. By default rule in the cd_storage_conf.xml, published content must go to the broker. For reference, here’s my config:

<Publication Id="57" defaultStorageId="brokerdb" cached="false">
    <Item typeMapping="ComponentPresentation" storageId="brokerdb" cached="false" />
    <Item typeMapping="BinaryMeta" cached="true" storageId="brokerdb"/>
    <Item typeMapping="BinaryVariant" cached="true" storageId="brokerdb"/>
    <Item typeMapping="Binary" storageId="defaultFile" cached="true"/> 
    <Item typeMapping="ComponentMeta" cached="true" storageId="brokerdb"/>
    <Item typeMapping="ComponentPresentationMeta" cached="true" storageId="brokerdb"/>
    <Item typeMapping="ItemMeta" cached="true" storageId="brokerdb"/>
    <Item typeMapping="LinkInfo" cached="true" storageId="defaultDataFile"/>
    <Item typeMapping="DynamicLinkInfo" cached="true" storageId="defaultDataFile"/>
    <Item typeMapping="Page" cached="true" storageId="defaultFile"/> 
    <Item typeMapping="PageMeta" cached="true" storageId="defaultDataFile"/>
    <Item typeMapping="Reference" storageId="brokerdb"/>
    <Item typeMapping="Schema" storageId="brokerdb"/>
</Publication>
  • 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-15T03:17:03+00:00Added an answer on June 15, 2026 at 3:17 am

    Double check your cd_storage_conf.xml and database to check the items are stored there. If your data is going to the file system it will not be query-able.

    Specifically I think the ComponentPresentationMeta must be going to the DB for this scenario to work.

    Also check your cd_licenses.xml file, if it is expired, if it is (even if the cd_storage_conf.xml is correct), the items will end up on the file system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a view passing on information from a database: def serve_article(request, id): served_article
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.