Common Fields - NCIOCPL/cgov-digital-platform GitHub Wiki

When we define display fallback rules below, ensure that you review the specific display element requirements to determine rules.

Title Fields

Page Title*

Used as the H1 on the page, and used in some lists

  • Field Name: This should be the Entity(node, media) "Title"
    • For Media it is name
    • For Nodes it is Title
  • Label: Page Title
  • Type: This should be the Entity(node, media) Title
  • Required: Yes
  • Max characters: 255
  • Tooltip Text: Unique and descriptive Title (H1 heading) for the page. [SEO best practice: 75 characters including spaces]
  • Cardinality: 1
  • Translatable: Yes

Browser Title *

Used as a part of the <title>

  • Field Name: field_browser_title
  • Label: Browser Title
  • Type: Text (plain)
  • Required
  • Max Characters: 100
  • Tooltip Text: Browser title for the page. Site name is automatically appended (Browser Title - National Cancer Institute) [Displays in: internal and external search results, browser tabs, social media sharing, and when card title is blank. SEO best practice - 42 characters including spaces]
  • Cardinality: 1
  • Translatable: Yes

Card Title

Used in feature and thumbnail cards

  • Field Name: field_card_title
  • Label: Card Title
  • Type: Text (plain)
  • Not required
    • If this field is empty, on display, we should show the browser title
  • Max Characters: 100
  • Tooltip Text: A shortened version of the title, for use in cards and lists. If left blank, browser title will display instead.
  • Cardinality: 1
  • Translatable: Yes

Descriptions

Meta-Description*

Used for SEO (this would be different from description, since it's for advertising our content within search engines)

  • Field Name: field_page_description
  • Label: Meta Description
  • Type: Text (plain)
  • Required: Yes
  • Max Characters: 600
  • Tooltip Text: Succinct description of the page content. [Displays in: internal and external search results. SEO best practice: Max 320 characters, most important information should be in the first 150 characters]
  • Validation Rules:
    • No HTML allowed in this field
  • Cardinality: 1
  • Translatable: Yes

List Description

Used for all manual and dynamic lists (except compact list) , and thumbnail cards

  • Field Name: field_list_description
  • Label: List Description
  • Type: Text (plain)
  • Required: No
  • Max Characters: unlimited
  • Tool Tip Text: 2-3 sentence description of the page content. [Displays in: Lists on Home/Landing, Mini Landing, and Cancer Research pages. If left blank, meta description will display instead]
  • Validation Rules:
    • No HTML allowed in this field
    • If this field is empty, on display, we would use meta-description
  • Cardinality: 1
  • Translatable: Yes

Feature Card Description

Used for feature cards, and compact lists

  • Field Name: field_feature_card_description
  • Label: Feature Card Description
  • Type: Text (plain)
  • Required: No
    • If this field is empty, nothing displays
  • Max Characters: 255
  • Validation Rules:
    • No HTML allowed in this field
  • Tooltip Text: Concise description for the page. Suggest max 75 characters. [Displays in: feature cards]
  • Cardinality: 1
  • Translatable: Yes

Content Dates

Content dates are the dates which are displayed on the front-end. These differ from system dates, as content owners do not usually set/modify the update date unless there were significant changes to the content. (e.g. information from new publications change treatment options)

Posted Date*

  • Field Name: field_date_posted
  • Label: Posted Date
  • Type: Date (date only)
  • Widget:
  • Required: Yes
    • Defaults to current date
  • Tooltip Text: Date the content was posted.
  • Cardinality: 1
  • Translatable: Yes

Reviewed Date *

  • Field Name: field_date_reviewed
  • Label: Reviewed Date
  • Type: Date (date only)
  • Widget:
  • Required: Yes
    • Defaults to current date
  • Tooltip Text: Date that the content was last reviewed by subject matter expert.
  • Cardinality: 1
  • Translatable: Yes

Updated Date *

  • Field Name: field_date_updated
  • Label: Updated Date
  • Type: Date (date only)
  • Widget:
  • Required: Yes
    • Defaults to current date
  • Tooltip Text: Date that changes were published to body text of page.
  • Cardinality: 1
  • Translatable: Yes

Date display mode - Keep as is with current rules (dependent on content type, see specific content type page for rules)

  • Field Name: field_date_display_mode
  • Label: Date Display Mode
  • Type: List with multiple selections
    • Posted Date
    • Reviewed Date
    • Updated Date
  • Widget:
  • Required: No
  • Tooltip Text: Select which date to display. [Displays on page, beneath the body text]
  • Cardinality: 1
  • Translatable: Yes

Images

Lead Image

This is used for the main image on an article content type (top right image), and will be used for promotional information unless the alternate promotional image is provided.

  • Field Name: field_image_article
  • Label: Lead Image
  • Type: Entity Reference
    • Allows media:image
  • Required: No
  • Rules: This pulls the "article" crop from the referenced image for display
  • Tooltip Text: Displays in top right position on the page. Used for lists, cards, and social media sharing, unless Promotional Image is selected.
  • Cardinality: 1
  • Translatable: Yes

Promotional Image

This is used for promotional images

  • Field Name: field_image_promotional
  • Label: Promotional Image
  • Type: Entity Reference
    • Allows media:image
  • Required: No
    • If provided, and the content type has a lead image, this will override the lead image's crops for the different areas promotional images (feature cards, panoramic, thumbnail as specified) appear.
    • If not provided, and the content type that has a lead image, the lead image's crops will be used for the different areas promotional images appear.
  • Tooltip Text: Overrides Lead Image for promotional use cases (lists, cards, social media sharing)
  • Cardinality: 1
  • Translatable: Yes

Content Fields

Intro Text

  • Uses the WYSIWYG as body field (Streamlined WYSIWYG)
  • Tooltip Text: Introductory text for the content on the page. [Displays above the body content; no character limit]
  • Front-end styling depends on the content type (blogs has a special styling that others do not)

Body

  • Field Storage for Body is unique
    • NODES:
      • Body should use the Core Node body field storage.
    • MEDIA:
      • For media items, it should use the body field storage as defined in cgov_media.
        • This is a copy of the Core Node body field storage with media replacing node.
  • Label: Body
  • Type: Text (formatted, long, with summary)
    • Future Requirement: "Full HTML" Editor WYSIWYG as body field (Full WYSIWYG)
  • Required: No
  • Tooltip Text: N/A
  • Cardinality: 1
  • Translatable: Yes

Citations

This is used on articles, factsheets, blogs, and press releases. Should be able to add multiple citations.

Citation

  • Field Name: field_citation
  • Label: Citation
  • Type: Paragraph
  • Required: No
  • Tooltip Text:
  • Type that can be added to the paragraph and their fields:
    • Citation Content (Streamlined WYSIWYG)
    • Pub Med ID (Text Field)
  • Cardinality: Infinite
  • Translatable: Yes

Containers

Related Resources

  • Field Name: field_related_resources
  • Label: Related Resources
  • Type: Paragraphs Asymmetric
    • Types Allowed:
      • cgov_external_link
      • cgov_internal_link
  • Required: No
  • Validations: N/A
  • Tooltip Text:
  • Cardinality: Infinite
  • Translatable: Yes

Recommended Content

Appears as feature cards on the bottom of blog posts.
Note: The header that appears above recommended content is currently controlled by a field on blog series. https://github.com/NCIOCPL/cgov-digital-platform/wiki/Content-Type-Blog-Series#recommended-content-header-aka-clickbait-header

  • Field Name: field_recommended_content
  • Label: Recommended Content
  • Type: Paragraphs Asymmetric
    • Types Allowed:
      • cgov_card_external
      • cgov_card_internal
  • Required: No
  • Validations: N/A
  • Tooltip Text:
  • Cardinality: 3
  • Translatable: Yes

Override Fields

Override Card Title

  • Field Name: field_override_card_title
  • Label: Override Card Title
  • Type: Text (plain)
  • Required: No
  • Max characters: 100
  • Tooltip Text: Used to override the page's card title. Leave blank if no need to override.
  • Cardinality: 1
  • Translatable: No

Override Card Description

  • Field Name: field_override_card_description
  • Label: Override Card Description
  • Type: Text (plain)
  • Required: No
  • Max characters: 255
  • Tooltip Text: Used to override the page's card description. Leave blank if no need to override.
  • Cardinality: 1
  • Translatable: No

Override Title

Used with Links in Lists

  • Field Name: field_override_title
  • Label: Override Title
  • Type: text plain, string
  • Required: No
  • Tooltip Text: None
  • Cardinality: 1
  • Translatable: No

Override Description

Used with Links in Lists

  • Field Name: field_override_description
  • Label: Override Description
  • Type: text plain, long
  • Required: no
  • Tooltip Text: Override description used in lists.
  • Cardinality: 1
  • Translatable: No

Override Promotional Image

  • Field Name: field_override_image_promotional
  • Label: Promotional Image
  • Type: Entity Reference
    • Image Browser
    • Display mode: Thumbnail
  • Required: None
  • Tooltip Text: None
  • Cardinality: 1
  • Translatable: No

NCIDS Fields

NCIDS Theme

  • Field Name: field_ncids_theme
  • Label: Theme
  • Type: Dropdown
    • Light
    • Dark
  • Required: Yes
  • Max characters: N/A
  • Tooltip Text: Selects the background color of the NCIDS component.
  • Cardinality: 1
  • Translatable: No

Other Common Fields

Additional Front-End Library

Used to add additional JS/CSS to a page

  • Field Name: field_additional_library
  • Label: Additional Front-End Library
  • Type: Dropdown
    • None (default)
    • <Pull from available Drupal Libraries with names that begin with 'addl_' for the Active Theme>
      • Note: Drupal only has machine names
  • Required: Yes
  • Tooltip Text: To be updated by IA (possible option: "use to add additional JS/CSS to a page. Do not do this unless you are a Drupal Admin.")
  • Cardinality: 1
  • Translatable: Yes

Tagline

Appears on top of the hero image for home and landing pages. Used to communicate high-level overview of the content of the website (or section of the site for landing pages).

  • Field Name: field_tagline (existing field)
  • Label: Tagline
  • Type: text (plain)
  • Required: yes
  • Max Characters: 255
  • Tooltip Text: Appears on top of the hero image for Home and Landing pages using the Standard template
  • Cardinality: 1
  • Translatable: No

Pretty URL

Used as the "tail" of the URL. When building URL aliases for the page, the parent section's pretty URL path is pre-pended to this. If empty, then the page inherits the parent section's pretty URL path as its alias.

  • Field Name: field_pretty_url
  • Label: Pretty URL
  • Required: No
  • Max Characters: 100
  • Validation Rules:
    • No capital letters
    • Only allows 0-9, a-z, and - (dash)
    • When preceded by the parent section's pretty URL path, the full alias must be unique within the site
      • This includes validating against any microsite (future requirement)
  • Tooltip Text: Used as the last segment of the URL. Leave blank if page is the designated landing page in the site section. Do not include slash (/). All lowercase, with no spaces; use hyphens to separate words.
  • Tooltip Text on the FILE media type ONLY: Used as the last segment of the URL. Do not include slash (/). All lowercase, with no spaces; use hyphens to separate words. Append with file extension (pretty-url.pdf)
  • Cardinality: 1
  • Translatable: Yes

Search Engine Restrictions*

Used to indicate how this page should be handled by both internal (sitewide search) and external (google) search engines.

  • Field Name: field_search_engine_restrictions
  • Label: Search Engine Restrictions
  • Type: Dropdown
    • Include in search (default)
    • Exclude from search
  • Required: Yes
  • Validations:
    • Include in search would be selected by default, with the option to switch to exclude
  • Tooltip Text: Indicate how a page should be handled by both internal (sitewide search) and external (Google) search engines.
  • App Modules should not show up in the sitemap. Its the job of the app module to "deal" with its own sitemap. See NCISEO-151)
  • Cardinality: 1
  • Translatable: Yes

Syndicate

Used to syndicate content out to HHS - is this allowed for all microsites?

  • Field Name: field_syndicate
  • Label: Syndicate
  • Type: Checkbox
    • Syndicate (default depends on content type, see each content type)
  • Required: No
  • Validations:
  • Cardinality: 1
  • Translatable: Yes

Syndication Keywords

Keywords that are used for HHS Syndication

  • Field Name: syndication_keywords
  • Label: Syndication Keywords
  • Required: No
  • Type: Text Field
  • Validations:
    • This would only be available on content types that are syndicated
  • Tooltip Text: Keywords used for HHS Syndication. Use a comma, followed by a space, to separate keywords.
  • Cardinality: 1
  • Translatable: Yes
  • Future requirement/possibility of becoming a taxonomy

Public Use

Used to display whether the information on the page is considered to be for public use/reuse. For articles and blog posts, this should be default to checked.

  • Field Name: field_public_use
  • Label: Public Use
  • Type: Checkbox (default depends on content type, see each content type)
    • Public Use
  • Required: No
  • Validations:
    • If this is checked, the Public Reuse text should then appear on the page
  • Tooltip Text:
  • Cardinality: 1
  • Translatable: Yes

External Link Display

  • Field Name: field_ext_link_display
  • Label: External Link Display
  • Type: Dropdown
    • Options: "Default" (default), "Force Display External Link Icon", and "Do Not Display External Link Icon"
  • Required: Yes
  • Tooltip Text: "The external link icon automatically displays for a hyperlink that isn't a .gov. Use this option to override the external link icon display rules."
  • Cardinality: 1
  • Translatable: No
⚠️ **GitHub.com Fallback** ⚠️