In hook_page_attachements() you need to add a condition only when reaction field pages should call the library. Otherwise you can add in field formatter element itself. It will call only the formatter loads in a page.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MRPRAVIN created an issue. See original summary.

padma28’s picture

Assigned: Unassigned » padma28
Status: Active » Needs work
padma28’s picture

Status: Needs work » Needs review
FileSize
1.11 KB

Added attachments in formatter. Please review.

MRPRAVIN’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine. Reviewed.

  • padma28 committed 7fe0187 on 8.x-2.x authored by MRPRAVIN
    Issue #2956249 by MRPRAVIN, padma28: Call library only when reaction...
padma28’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.