Paragraph Type Links - NCIOCPL/cgov-digital-platform GitHub Wiki

Links are placed inside of Lists, Related Resources Field, CTHP More Info Field, Cancer Research Pages.

Properties

There are three types of links:

Internal Link

  • Display Name: Internal Link
  • Machine-readable Name: cgov_internal_link
  • Description: Link to internal content
  • Translatable: No

Common Fields

Local Fields

Internal Link

  • Field Name: field_internal_link
  • Label: Link
  • Type: Entity Reference to Content
    • Field Widget: Entity Browser field
  • Selection Display: Rendered Entity using Entity Browser Selected Entity
  • Required: Yes
  • Tooltip Text: None
  • Cardinality: 1
  • Translatable: No

Form Display

  • Link
  • Override Title
  • Override List Description
  • Override Promotional Image

External Link

  • Display Name: External Link
  • Machine-readable Name: cgov_external_link
  • Description: Link to external content
  • Translatable: No

Common Fields

Local Fields

Link

  • Field Name: field_external_link
  • Label: Link
  • Type: Text field
  • Required: Yes
  • Tooltip Text:
  • Cardinality: 1
  • Translatable: ❓❓

Form Display

  • Link
  • External Link Display
  • Title
  • List Description
  • Promotional Image

Media Link

  • Display Name: Media Link
  • Machine-readable Name: cgov_media_link
  • Description: Link to media content for Lists.

Common Fields

Local Fields

Media Link

  • Field Name: field_media_link
  • Label: Link
  • Type: Entity Reference to Media
  • Field Widget: Entity Browser field
    • Use Media Browser (NOTE: Images show for now - just deal with it.)
    • Selection Display: Rendered Entity using Entity Browser Selected Entity
    • Allowed Bundles:
      • cgov_video
      • cgov_file
      • cgov_infographic
  • Required: yes
  • Tooltip Text: None
  • Cardinality: 1
  • Translatable: No

Form Display

  • Link
  • Override Title
  • Override List Description
  • Override Promotional Image

Media Link Title Display Rules

Media items display mostly the same ways as the internal and external links, the difference is that the title contains information about the media type or file information.

All titles are either the Name of the media item, or the Override Title.

Only the title portion of the link is clickable and responds to hover - the media type does not.

Infographic

English

<Infographic Title> (Infographic)

Spanish

<Infographic Title> (Infografía)

Video

English

<Video Title> (Video)

Spanish

<Video Title> (Video)

Files

English and Spanish

<File Title> (<icon or filetype>) (<Size> <unit>)
  • Like with other media types, the title is the clickable link (icon and size are not included in the link)
  • If the file is .html or .htm then the title displays only as <File Title>
  • Only these icons are available for display - any other extensions show as . (and have no icon)
    • pdf
    • MS Word (.doc and .docx)
    • MS Excel (.xls and .xlsx)
    • MS Powerpoint (.ppt and .pptx)
    • mobi
    • epub
    • exe
    • txt
  • For the file size, use these rules
    • Round the file size to the nearest integer.
    • Display the file size in bytes if the file size is less than 1 KB.
    • Display the file size in KB if the file size is less than 1 MB.
    • Display the file size in MB if the file size is more than 1 MB.
⚠️ **GitHub.com Fallback** ⚠️