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:
tcm_0-4723828-66560.Content
\Pages
\Schemas
\components.xml
\instructions.xml
\pages.xml
\schemas.xml
\transaction.xml
\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:Context>
<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:Context>
<tcm:Info>
<tcm:LocationInfo>
<tcm:WebDAVURL>/Home/test/devtest/json/LinkedLightBoxPage.tpg</tcm:WebDAVURL>
<tcm:Path>\Home\test\devtest\json</tcm:Path>
<tcm:PublishPath>\test\devtest\json</tcm:PublishPath>
<tcm:PublishLocationPath>\json\LinkedLightBoxPage.json</tcm:PublishLocationPath>
<tcm:PublishLocationUrl>/LinkedLightBoxPage.json</tcm:PublishLocationUrl>
</tcm:LocationInfo>
<tcm:BluePrintInfo>
<tcm:OwningPublication xlink:type="simple" xlink:title="Site US English" xlink:href="tcm:0-222-1"/>
<tcm:IsShared>false</tcm:IsShared>
<tcm:IsLocalized>false</tcm:IsLocalized>
</tcm:BluePrintInfo>
<tcm:VersionInfo>
<tcm:Version>35</tcm:Version>
<tcm:Revision>0</tcm:Revision>
<tcm:CreationDate>2018-04-27T13:14:25</tcm:CreationDate>
<tcm:RevisionDate>2018-06-08T15:20:43</tcm:RevisionDate>
<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:IsNew>false</tcm:IsNew>
<tcm:SystemComment>Checked-in by user.</tcm:SystemComment>
<tcm:UserComment/>
</tcm:VersionInfo>
<tcm:LockInfo>
<tcm:ItemLock Type="0" Title="No lock"/>
</tcm:LockInfo>
<tcm:PublishInfo>
<tcm:IsPublished>true</tcm:IsPublished>
</tcm:PublishInfo>
<tcm:WorkflowInfo>
<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:CreationDate/>
<tcm:StartDate/>
<tcm:FinishDate/>
<tcm:PreviousMessage>
</tcm:PreviousMessage>
<tcm:AssignmentDate/>
<tcm:DueDate/>
</tcm:WorkflowInfo>
<tcm:AllowedActions>
<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:AllowedActions>
</tcm:Info>
<tcm:Data>
<tcm:Title>LinkedLightBoxPage</tcm:Title>
<tcm:FileName>LinkedLightBoxPage</tcm:FileName>
<tcm:PageTemplate IsInherited="false" xlink:type="simple" xlink:title="test Page (Enhanced)" xlink:href="tcm:222-163372-128"/>
<tcm:ComponentPresentations>
<tcm:ComponentPresentation>
<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:Conditions/>
</tcm:ComponentPresentation>
<tcm:ComponentPresentation>
<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:Conditions/>
</tcm:ComponentPresentation>
</tcm:ComponentPresentations>
<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"/>
<tcm:Metadata>
<Metadata xmlns="uuid:dd6cbf29-0901-4833-92c1-a048e90615cd">
<page_header_display>Page Header Display</page_header_display>
<embedded_global>
<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>
<page_type>None</page_type>
<seo_sitemap>SEO Sitemap</seo_sitemap>
<seo_sitemap_type>SEO Primary Sitemap</seo_sitemap_type>
<default_url>/test/devtest/json/LinkedLightBoxPage</default_url>
<canonical_tag>/test/devtest/json/LinkedLightBoxPage/</canonical_tag>
<robots>index, follow</robots>
<lightbox_overlayheight>350</lightbox_overlayheight>
<lightbox_overlaywidth>500</lightbox_overlaywidth>
<lightbox_overlayprint>LightBox/Overlay Print</lightbox_overlayprint>
</embedded_global>
<page_variation>test Narrow</page_variation>
<primary_region_backgroundcolor>Theme 12</primary_region_backgroundcolor>
<body_region>
<background_color>Theme 12</background_color>
</body_region>
<bottom_region>
<background_color>Theme 12</background_color>
</bottom_region>
</Metadata>
</tcm:Metadata>
<tcm:RegionSchema xlink:type="simple" xlink:title="" xlink:href="tcm:0-0-0"/>
<tcm:Regions/>
</tcm:Data>