Creating a new content type - acquia/acquia_cms GitHub Wiki

If you create a new content type and you want to set it up with a nifty listing page, you have to do a hell of a lot of work. Here are the steps:

  • Add your content type to the search index. You'll at least need to index the rendered entity (in full content view mode, I think). If you have a "type" taxonomy for this content type, you'll need to be sure that's explicitly indexed too, both the term ID and term name. (See existing examples in the index for the bundled content types.)
  • Create a Cohesion view template for this view. (Use the one for Articles as a model.)
  • Clone the articles_fallback view for your content type and modify its parameters as needed. You'll probably want to give it a similar label and machine name: "NuPages (fallback)" and "nupages_fallback".
  • Clone the articles view for your content type and modify its parameters, especially its filters and empty behavior, as needed. You'll probably need to ensure it uses the correct fallback view and has the correct empty text. Make sure the view is using the Cohesion template you created for this view.
  • Add a new Categories facet for this new view. You can clone the existing articles_category one and adjust as needed.
  • If you have a "type" taxonomy for the content type, create a facet for that too. See the articles_article_type facet for an example, or a model to clone.
  • Add both facet blocks to the dx8_hidden region of the theme.
  • Add both both blocks to the Cohesion view template for the new view.