Create the Disease and Intervention Dynamic Listing Pages in Drupal - NCIOCPL/clinical-trials-listing-app GitHub Wiki

This page outlines the steps to follow for creating the Disease and Intervention Dynamic Listing Page application page content items in Drupal.

Update the Frontend Globals Config

  1. Login to Drupal
  2. On the content screen (/admin/content) navigate to the Frontend Globals Config Editor
    1. Configuration > System > Frontend Globals Config Editor
  3. Enter into the Frontend Globals JSON Config Object:
{
  "exitDisclaimerHref": {
    "en": "/policies/linking",
    "es": "/espanol/politicas/enlaces"
  },
  "showFloatingDelighters": true,
  "environmentConfig": [],
  "glossaryConfig": {
    "apiServer": "https://webapis.cancer.gov/glossary/v1/"
  },
  "drugDictionaryConfig": {
    "apiServer": "https://webapis.cancer.gov/drugdictionary/v1/"
  },
  "ctsConfig": {
    "apiServer": "clinicaltrialsapi.cancer.gov",
    "listingApiServer": "https://webapis.cancer.gov/triallistingsupport/v1/",
    "printCacheEndpoint": "https://www.cancer.gov/CTS.Print/GenCache",
    "zipConversionEndpoint": "/zip_code_lookup"
  },
  "r4rConfig": {
    "apiServer": "https://webapis.cancer.gov/r4r/v1/"
  },
  "general": {
    "apiServer": "https://webapis.cancer.gov",
    "mediaServer": "https://nci-media.cancer.gov"
  },
  "sitewideSearchConfig": {
    "bestBetsApiServer": "https://webapis.cancer.gov/bestbets/v1/",
    "searchApiServer": "https://webapis.cancer.gov/sitewidesearch/v1/"
  }
}
  1. Save

Deploying the App Module in Drupal

Initial Deployment

  1. Login to Drupal
  2. On the content screen (/admin/content) click the "+Add content" button
  3. Select Application Page as the type
  4. Setup all the necessary metadata
    1. Disease
      1. Section: /about-cancer/treatment/clinical-trials
      2. Pretty URL: disease
      3. Page Title: Disease Dynamic Trial Listing Page
      4. Browser Title: Disease Dynamic Trial Listing Page
      5. Meta Description: Disease Dynamic Trial Listing View Page
    2. Intervention
      1. Section: /about-cancer/treatment/clinical-trials
      2. Pretty URL: disease
      3. Page Title: Intervention Dynamic Trial Listing Page
      4. Browser Title: Intervention Dynamic Trial Listing Page
      5. Meta Description: Intervention Dynamic Trial Listing View Page
  5. For the Application Module field, select "JS-Only App Module"
  6. Enter the config in the App Module Instance Settings field. See below for the configs for Disease and Intervention.
    1. NOTE: The values for the following fields may need to be updated with the netstorage location of the most recent release of clinical-trials-listing-app
      1. appCssUri
      2. appJsUri
      3. cisBannerImgUrlLarge
      4. cisBannerImgUrlSmall
  7. For Application Module Page Template, select "Display Left Nav"
  8. Push the item through the workflow into Published state
    1. NOTE: You may need to clear the Drupal cache for the page to work.

Config Format

Disease:

{
    "drupalConfig": {
        "appName": "clinical-trials-listing-app-disease",
        "rootId": "NCI-trial-listing-app-root",
        "initFnName": "window.ClinicalTrialsListingApp",
        "appCssUri": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/static\/css\/main.css",
        "appJsUri": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/static\/js\/main.js",
        "removeHeadElements": [
            "canonical_url",
            "robots",
            "title_tag",
            "og_title",
            "og_url",
            "og_description",
            "description"
        ],
        "validAppPaths": []
    },
    "frontEndConfig": {
        "analyticsChannel": "@@TOKEN@@[cgov_tokens:cgov-analytics-channel]",
        "analyticsContentGroup": "@@TOKEN@@[cgov_tokens:cgov-analytics-group]",
        "analyticsPublishedDate": "@@TOKEN@@[node:field_date_posted:date:short]",
        "cisBannerImgUrlLarge": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/images\/cts-cis-banner-xl.jpeg",
        "cisBannerImgUrlSmall": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/images\/cts-cis-banner-smartphone.jpeg",
        "ctsApiHostname": "@@LITERAL@@window.CDEConfig.ctsConfig.apiServer",
        "ctsPort": null,
        "ctsProtocol": "https",
        "dynamicListingPatterns": {
            "Disease": {
                "browserTitle": "{{disease_label}} Clinical Trials",
                "introText": "<p>Clinical trials are research studies that involve people. The clinical trials on this list are for {{disease_normalized}}. All trials on the list are NCI-supported clinical trials, which are sponsored or otherwise financially supported by NCI.<\/p><p>NCI’s <a href=\"\/about-cancer\/treatment\/clinical-trials\/what-are-trials\">basic information about clinical trials<\/a> explains the types and phases of trials and how they are carried out. Clinical trials look at new ways to prevent, detect, or treat disease. You may want to think about taking part in a clinical trial. Talk to your doctor for help in deciding if one is right for you.<\/p>",
                "metaDescription": "NCI supports clinical trials studying new and more effective ways to detect and treat cancer. Find clinical trials for {{disease_normalized}}.",
                "noTrialsHtml": "<p>There are no NCI-supported clinical trials for {{disease_normalized}} at this time. You can try a <a href=\"\/about-cancer\/treatment\/clinical-trials\/search\">new search<\/a> or <a href=\"\/contact\">contact our Cancer Information Service<\/a> to talk about options for clinical trials.<\/p>",
                "pageTitle": "{{disease_label}} Clinical Trials"
            },
            "DiseaseTrialType": {
                "browserTitle": "{{trial_type_label}} Clinical Trials for {{disease_label}}",
                "introText": "<p>Clinical trials are research studies that involve people. The clinical trials on this list are for {{disease_normalized}} {{trial_type_normalized}}. All trials on the list are NCI-supported clinical trials, which are sponsored or otherwise financially supported by NCI.<\/p><p>NCI’s <a href=\"\/about-cancer\/treatment\/clinical-trials\/what-are-trials\">basic information about clinical trials<\/a> explains the types and phases of trials and how they are carried out. Clinical trials look at new ways to prevent, detect, or treat disease. You may want to think about taking part in a clinical trial. Talk to your doctor for help in deciding if one is right for you.<\/p>",
                "metaDescription": "NCI supports clinical trials studying new and more effective ways to detect and treat cancer. Find {{trial_type_normalized}} clinical trials for {{disease_normalized}}.",
                "noTrialsHtml": "<p>There are no NCI-supported clinical trials for {{disease_normalized}} {{trial_type_normalized}} at this time. You can try a <a href=\"\/about-cancer\/treatment\/clinical-trials\/search\">new search<\/a> or <a href=\"\/contact\">contact our Cancer Information Service<\/a> to talk about options for clinical trials.<\/p>",
                "pageTitle": "{{trial_type_label}} Clinical Trials for {{disease_label}}"
            },
            "DiseaseTrialTypeIntervention": {
                "browserTitle": "{{trial_type_label}} Clinical Trials for {{disease_label}} Using {{intervention_label}}",
                "introText": "<p>Clinical trials are research studies that involve people. The clinical trials on this list are testing {{trial_type_normalized}} methods for {{disease_normalized}} that use {{intervention_normalized}}. All trials on the list are NCI-supported clinical trials, which are sponsored or otherwise financially supported by NCI.<\/p><p>NCI’s <a href=\"\/about-cancer\/treatment\/clinical-trials\/what-are-trials\">basic information about clinical trials<\/a> explains the types and phases of trials and how they are carried out. Clinical trials look at new ways to prevent, detect, or treat disease. You may want to think about taking part in a clinical trial. Talk to your doctor for help in deciding if one is right for you.<\/p>",
                "metaDescription": "NCI supports clinical trials studying new and more effective ways to detect and treat cancer. Find clinical trials testing {{intervention_normalized}} in the {{trial_type_normalized}} of {{disease_normalized}}.",
                "noTrialsHtml": "<p>There are no NCI-supported clinical trials for {{disease_normalized}} {{trial_type_normalized}} using {{intervention_normalized}} at this time. You can try a <a href=\"\/about-cancer\/treatment\/clinical-trials\/search\">new search<\/a> or <a href=\"\/contact\">contact our Cancer Information Service<\/a> to talk about options for clinical trials.<\/p>",
                "pageTitle": "{{trial_type_label}} Clinical Trials for {{disease_label}} Using {{intervention_label}}"
            }
        },
        "detailedViewPagePrettyUrlFormatter": "\/clinicaltrials\/{{nci_id}}",
        "itemsPerPage": 25,
        "language": "en",
        "listingApiEndpoint": "@@LITERAL@@window.CDEConfig.ctsConfig.listingApiServer",
        "liveHelpUrl": "https:\/\/livehelp.cancer.gov\/app\/chat\/chat_landing?_icf_22=92",
        "siteName": "@@TOKEN@@[cgov_tokens:cgov-trans-org-name]",
        "title": "@@TOKEN@@[node:field_browser_title:value]",
        "trialListingPageType": "Disease"
    }
}

Intervention:

{
    "drupalConfig": {
        "appName": "clinical-trials-listing-app-intervention",
        "rootId": "NCI-trial-listing-app-root",
        "initFnName": "window.ClinicalTrialsListingApp",
        "appCssUri": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/static\/css\/main.css",
        "appJsUri": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/static\/js\/main.js",
        "removeHeadElements": [
            "canonical_url",
            "robots",
            "title_tag",
            "og_title",
            "og_url",
            "og_description",
            "description"
        ],
        "validAppPaths": []
    },
    "frontEndConfig": {
        "analyticsChannel": "@@TOKEN@@[cgov_tokens:cgov-analytics-channel]",
        "analyticsContentGroup": "@@TOKEN@@[cgov_tokens:cgov-analytics-group]",
        "analyticsPublishedDate": "@@TOKEN@@[node:field_date_posted:date:short]",
        "cisBannerImgUrlLarge": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/images\/cts-cis-banner-xl.jpeg",
        "cisBannerImgUrlSmall": "https:\/\/react-app-dev.cancer.gov\/clinical-trials-listing-app\/develop\/images\/cts-cis-banner-smartphone.jpeg",
        "ctsApiHostname": "@@LITERAL@@window.CDEConfig.ctsConfig.apiServer",
        "ctsPort": null,
        "ctsProtocol": "https",
        "dynamicListingPatterns": {
            "Intervention": {
                "pageTitle": "Clinical Trials Using {{intervention_label}}",
                "browserTitle": "Clinical Trials Using {{intervention_label}}",
                "metaDescription": "NCI supports clinical trials that test new and more effective ways to treat cancer. Find clinical trials studying {{intervention_normalized}}.",
                "introText": "<p>Clinical trials are research studies that involve people. The clinical trials on this list are studying {{intervention_normalized}}. All trials on the list are NCI-supported clinical trials, which are sponsored or otherwise financially supported by NCI.<\/p><p>NCI’s <a href=\"\/about-cancer\/treatment\/clinical-trials\/what-are-trials\">basic information about clinical trials<\/a> explains the types and phases of trials and how they are carried out. Clinical trials look at new ways to prevent, detect, or treat disease. You may want to think about taking part in a clinical trial. Talk to your doctor for help in deciding if one is right for you.<\/p>",
                "noTrialsHtml": "<p>There are no NCI-supported clinical trials studying {{intervention_normalized}} at this time. You can try a <a href=\"\/about-cancer\/treatment\/clinical-trials\/search\">new search<\/a> or <a href=\"\/contact\">contact our Cancer Information Service<\/a> to talk about options for clinical trials.<\/p>"
            },
            "InterventionTrialType": {
                "pageTitle": "{{trial_type_label}} Clinical Trials Using {{intervention_label}}",
                "browserTitle": "{{trial_type_label}} Clinical Trials Using {{intervention_label}}",
                "metaDescription": "NCI supports clinical trials studying new and more effective ways to treat cancer. Find clinical trials testing {{trial_type_normalized}} methods that use {{intervention_normalized}}.",
                "introText": "<p>Clinical trials are research studies that involve people. The clinical trials on this list are testing {{trial_type_normalized}} methods that use {{intervention_normalized}}. All trials on the list are NCI-supported clinical trials, which are sponsored or otherwise financially supported by NCI.<\/p><p>NCI’s <a href=\"\/about-cancer\/treatment\/clinical-trials\/what-are-trials\">basic information about clinical trials<\/a> explains the types and phases of trials and how they are carried out. Clinical trials look at new ways to prevent, detect, or treat disease. You may want to think about taking part in a clinical trial. Talk to your doctor for help in deciding if one is right for you.<\/p>",
                "noTrialsHtml": "<p>There are no NCI-supported clinical trials for {{trial_type_normalized}} using {{intervention_normalized}} at this time. You can try a <a href=\"\/about-cancer\/treatment\/clinical-trials\/search\">new search<\/a> or <a href=\"\/contact\">contact our Cancer Information Service<\/a> to talk about options for clinical trials.<\/p>"
            }
        },
        "detailedViewPagePrettyUrlFormatter": "\/clinicaltrials\/{{nci_id}}",
        "itemsPerPage": 25,
        "language": "en",
        "listingApiEndpoint": "@@LITERAL@@window.CDEConfig.ctsConfig.listingApiServer",
        "liveHelpUrl": "https:\/\/livehelp.cancer.gov\/app\/chat\/chat_landing?_icf_22=92",
        "siteName": "@@TOKEN@@[cgov_tokens:cgov-trans-org-name]",
        "title": "@@TOKEN@@[node:field_browser_title:value]",
        "trialListingPageType": "Intervention"
    }
}
⚠️ **GitHub.com Fallback** ⚠️