Cross-Publishing from Tomorrow Sport
If you have set up your user permissions correctly as described in step 2 of Create Tomorrow Sport, then you should now be able to cross-publish content from Tomorrow Sport to Tomorrow Online. That is, when editing Tomorrow Online in CUE, you should be able to find content belonging to Tomorrow Sport and desk it in Tomorrow Online. It will then appear on the Tomorrow Online website as if it were Tomorrow Online content.
The Tomorrow Online front page has a "Latest in Sports" section at the
bottom that by default displays teasers for content in the Tomorrow
Online Sport section. This content is selected by a data source called
latest_sport.graphql
, which you can find in the
publication-path/recipe/datasources
folder:
{ and { publication field(name:"home_section_name", value:"Sport") or { type(names: ["story","legacystory"]) } } }
The
publication-path/recipe/datasources
folder also contains an alternative version of this data source called
latest_sport_tomorrow_sport.graphql
, which selects
content from Tomorrow Sport instead of from the Tomorrow Online Sport
section:
{ and { publication(name: "tomorrow-sport") field(name:"home_section_name", value:"News") or { type(names: ["story","legacystory"]) } } }
You can therefore switch from displaying local sports content to
cross-published sports content on the front page by making the following
change to line 2 of the the GraphQL query that assembles content for the
Tomorrow Online front page
(publication-path/recipe/queries/index-page-ece_frontpage.graphql
):
latest_sport: datasource(name:"latest_sport_tomorrow_sport") {