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.
There are three types of links:
- Internal Link - pulling content from within the site
- External Link - custom URL and display fields
- Media link - pulls internal media content (infographics, videos, etc.)
- Display Name: Internal Link
- Machine-readable Name: cgov_internal_link
- Description: Link to internal content
- Translatable: No
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
- Link
- Override Title
- Override List Description
- Override Promotional Image
- Display Name: External Link
- Machine-readable Name: cgov_external_link
- Description: Link to external content
- Translatable: No
- Override Title
- Override Description
- Override Promotional Image
-
External Link Display
- Label: External Link Display
- Field Name: field_external_link
- Label: Link
- Type: Text field
- Required: Yes
- Tooltip Text:
- Cardinality: 1
- Translatable: ❓❓
- Link
- External Link Display
- Title
- List Description
- Promotional Image
- Display Name: Media Link
- Machine-readable Name: cgov_media_link
- Description: Link to media content for Lists.
- 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
- Link
- Override Title
- Override List Description
- Override Promotional Image
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.
English
<Infographic Title> (Infographic)
Spanish
<Infographic Title> (Infografía)
English
<Video Title> (Video)
Spanish
<Video Title> (Video)
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)
- 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.