Documentation Center

Content mashup overview

To do a content mashup, you need to perform tasks in both products.

A shared Taxonomy
To make it possible for content from both products to appear on the same webpage, you must ensure that Tridion Docs authors can tag their content with Keywords from a Taxonomy in Tridion Sites. The first step toward achieving this goal is deciding which metadata you want to share between the products, and create or reuse a Taxonomy in Tridion Sites to facilitate this sharing.
In the web client of Tridion Docs, implementers can configure the Metadata Binding Handler. More specifically, they do this in the Settings tab, in the XML Extension Settings.
Also in Tridion Docs, implementers can use existing functionality for connecting to an external Taxonomy to map to a Category in Sites.
Once the Taxonomy is properly shared, Tridion Docs can tag their topics with a Keyword from the shared Taxonomy, just like they would tag their topics with any other custom metadata.
A GraphQL client
The easiest way to create a Public Content API client is to use the one provided with DXA, even if you don't use any other part of that product. The client (a .NET assembly or JAR file, depending on your web site technology) can be used without the rest of DXA.
Alternatively, you can set up your own GraphQL client. Such clients are freely available for both Java-based and .NET-based websites. All you need to do is connect them to your Content Service endpoint, which defaults to http://HOST:8081/cd/api, where HOST is the host machine name for this service. You authenticate your request through the Token Service.
In your web application, generate GraphQL queries that correspond to your webpage's content request and send them to the endpoint. For example, you might create jSON templates to put custom data, such as a visitor's search query, into, and then send the generated JSON to the endpoint.
A shared visualization
Depending on your specific requirements, you may want to make your published Tridion Docs and Tridion Sites content look different, or the same. In the latter case, you may want to, say, make the <title> of your Tridion Docs DITA topic appear the same as a field containing the title of your Tridion Sites Component. Because the content is fetched in JSON, you can create CSS files and other styling in order to implement this uniformity of style. Here, too, refer to the DXA downloadable for useful CSS files.
Setting up the API
Doing a content mashup requires that you use the Public Content API; you cannot use the CILs (Content Interaction Libraries). The Public Content API is namespace-aware, so you do not need to configure a namespace in the Content Service; the Public Content API ignores such a configured namespace.