We are publishing page output in json. We are not using any DWT code to generate json. To generate json, we are doing changes at page template TBB. Json output is coming in below format.

"regions": {
   "body": [
       "component": {
         "id": "tcm:182-72773-16",
         "title": "test",
         "schema": "Text",
         "content": {
           "text": [
             "<p>sample text</p>"
         "metadata": {
           "embedded_global": null,
           "textalignment": null
       "componentTemplate": {
         "id": "tcm:223-3757-32",
         "title": "Body_Text"

For above json, we don't see components.xml is getting generated in Transport package.

Any idea, how this components.xml is getting generated? What needs to be done to create this components.xml file?

Below is structure contain in transport package:


\components.xml is missing when publish page as json.

I have components added on page as well. In Json output, in below format we are adding component.

"component": {
      "id": "tcm:182-72773-16",
      "title": "technology",
      "schema": "Text",
      "content": {
        "text": [
          "<p>application process.</p>"
      "metadata": {
        "embedded_global": null,
        "textalignment": null
    "componentTemplate": {
      "id": "tcm:223-3757-32",
      "title": "Body_Text"

Template Building Block package output:

   <tcm:Page ID="tcm:222-163880-64" IsEditable="false" xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <tcm:Publication xlink:type="simple" xlink:title="Site US English" xlink:href="tcm:0-222-1"/>
    <tcm:OrganizationalItem xlink:type="simple" xlink:title="json" xlink:href="tcm:222-155270-4"/>
        <tcm:OwningPublication xlink:type="simple" xlink:title="Site US English" xlink:href="tcm:0-222-1"/>
        <tcm:Creator xlink:type="simple" xlink:title="****" xlink:href="tcm:0-3574-65552" description="sssss  "/>
        <tcm:Revisor xlink:type="simple" xlink:title="****" xlink:href="tcm:0-3574-65552" description="ssss "/>
        <tcm:ItemLock Type="0" Title="No lock"/>
        <tcm:SystemComment>Checked-in by user.</tcm:SystemComment>
        <tcm:ItemLock Type="0" Title="No lock"/>
        <tcm:ProcessInstance xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0"/>
        <tcm:ActivityInstance Description="" xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0"/>
        <tcm:Assignee xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0" description=""/>
        <tcm:Performer xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0" description=""/>
        <tcm:Actions Allow="73736" Deny="268487655" Managed="0" AllowedActions="tcm:View,tcm:Copy,tcm:HistoryList" DeniedActions="tcm:Publish,tcm:UnPublish,tcm:Edit,tcm:Delete,tcm:Classification,tcm:Localize,tcm:Unlocalize,tcm:Cut,tcm:Promote,tcm:Demote,tcm:CheckOut,tcm:CheckIn,tcm:UndoCheckOut,tcm:RePublish"/>
    <tcm:PageTemplate IsInherited="false" xlink:type="simple" xlink:title="test Page (Enhanced)" xlink:href="tcm:222-163372-128"/>
            <tcm:Component xlink:type="simple" xlink:title="assistive-technology" xlink:href="tcm:222-72773"/>
            <tcm:ComponentTemplate xlink:type="simple" xlink:title="Body_Text" xlink:href="tcm:222-3757-32"/>
            <tcm:Component xlink:type="simple" xlink:title="222_LinkedLightBoxPage" xlink:href="tcm:222-163881"/>
            <tcm:ComponentTemplate xlink:type="simple" xlink:title="NavigationCT" xlink:href="tcm:222-5332-32"/>
    <tcm:ApprovalStatus xlink:type="simple" xlink:title="Undefined" xlink:href="tcm:0-0-0"/>
    <tcm:MetadataSchema xlink:type="simple" xlink:title="Page (test Page Enhanced)" xlink:href="tcm:222-135069-8"/>
        <Metadata xmlns="uuid:dd6cbf29-0901-4833-92c1-a048e90615cd">
            <page_header_display>Page Header Display</page_header_display>
                <nav_page_title>This is linked lightbox page</nav_page_title>
                <nav_page_header>This is linked lightbox page header</nav_page_header>
                <page_description>This is linked page description</page_description>
                <seo_sitemap>SEO Sitemap</seo_sitemap>
                <seo_sitemap_type>SEO Primary Sitemap</seo_sitemap_type>
                <robots>index, follow</robots>
                <lightbox_overlayprint>LightBox/Overlay Print</lightbox_overlayprint>
            <page_variation>test Narrow</page_variation>
            <primary_region_backgroundcolor>Theme 12</primary_region_backgroundcolor>
                <background_color>Theme 12</background_color>
                <background_color>Theme 12</background_color>
    <tcm:RegionSchema xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0"/>

  • 1
    You need components in a page for components.xml to exist. Changing the page or the template won’t generate it.
    – Nuno Linhares
    Jun 7 '18 at 20:11
  • I have components added on page as well. In Json output , in below format we are adding component. "component": { "id": "tcm:182-72773-16", "title": "technology", "schema": "Text", "content": { "text": [ "<p>Acessible grant application process.</p>" ] }, "metadata": { "embedded_global": null, "textalignment": null } }, "componentTemplate": { "id": "tcm:223-3757-32", "title": "Body_Text" }
    – Vivek
    Jun 7 '18 at 21:11
  • Does Tridion looks for specific tag for components to create components.xml?
    – Vivek
    Jun 7 '18 at 21:15
  • I am not sure whether it has any relation to "@@RenderComponentPresentation()@@" , we are not using this anywhere in component template or page template to generate JSON. We don't need component presentation as we are passing only content in json.
    – Vivek
    Jun 7 '18 at 21:32
  • Well, you're not using DWT so that call wouldn't apply. Describe the Page you're publishing--does it have Component Presentations on it directly and are their templates dynamic? What does Template builder show you in the Package as you step through your Template Building Blocks?
    – Alvin Reyes
    Jun 8 '18 at 1:25

I think the problem may lie in that you have to explicitly add (rendered) Component Presentations as "Child Rendered Items" to the Rendered Item of the Page, otherwise at least CD Component Linking will not work properly (and maybe you indeed don't get a components.xml at all).

See, for example, this piece of DXA 2.0 templating code (search for childRenderedItem): https://github.com/sdl/dxa-content-management/blob/master/Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs

Again, note that DXA 2.0 TBBs produce JSON that is quite similar to what you're looking for and already take care of intricacies like this one. I would recommend using the DXA 2.0 TBBs or the entire DXA 2.0 Framework for that matter.


Forgive me if I miss something, it's been awhile. Why do you need the Components.xml file?

Dynamic Component Presentations

Yes, rendering a Component Presentation from a template will add that Component to the package, independent of what's on the page. The use case is wanting to add some re-used header or footer content to every page.

As a good practice, these independent Component Presentations might be "dynamic," meaning its Component Template is set to publish dynamically. Editors can then publish this Dynamic Component Presentation (DCP) independent of the page. And when publishing the page, only a reference is included (tcdl tag) in the outputted XML, which is processed in delivery.

As far as I understand, any (tcdl) tags, controls, or markup in the Page, Component, or Components don't directly control what ends up in the package. That logic is up to the template. For example, the Default Finish Actions has a TBB to look for image references and add them to the package.

Learn more about the Package or Template Builder.

See my post on static pages, Dynamic Component Presentations, and Dynamic Embedded Component Presentations or @WillPrice's piece on when to make a Component Template "Dynamic."


You don't need a DWT Template Building Block for this, though. This could be in a C# or other TBB depending on your CM-side templating. Even when "outputting JSON" there's always a CM-side template (building block).


The default resolving logic for a Page, when you queue a Page for publishing, includes the Page itself (rendering content embedded into it) as well as any DCPs embedded into the Page.

If you have a DCP embedded on the page it should automatically be included in the Package. Note that you can't tell they're DCPs from the Page, this depends on Template settings.

See my other post on these resolving rules for background.

I've never really done much with the Transport Package directly. It's historically been an unsupported format, so I'm not sure why you really need the Components.xml file. I believe the items in the Template's Package end up in the package, maybe after a bit more processing (CM-side Renderers?).

tl;dr: Looking at your Page and template setup and running Template Builder should help you resolve or adjust your setup.

  • I am having issue with component linking. When I publish page in json, I don't see records going in "Link_Info" table in Broker database. When we inspect transport package, we see components.xml is missing from package.
    – Vivek
    Jun 8 '18 at 22:53
  • I have added template building block package output for json page. I don't see any issue there. It is generating expected output.
    – Vivek
    Jun 8 '18 at 23:57
  • Does the TBB package include any of the Components on the page? This would be separate from the Page output itself. Also the Component "technology" (tcm:182-72773-16) seems to have a different Publication context than the one on the page ("assistive-technology" with ID tcm:222-72773), not sure if that matters here (perhaps you ran the template in a different Publication?).
    – Alvin Reyes
    Jun 11 '18 at 8:58
  • Yes. TBB package include components on page as well.
    – Vivek
    Jun 11 '18 at 21:00
  • Okay, I was assuming there is a relationship between the Components item in the Page's template package and the components.xml file in the transport package. See @Rick's answer as there seems to be a different mechanism that creates the linking relationships in Content Delivery.
    – Alvin Reyes
    Jul 8 '18 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.