{"id":16362633,"url":"https://github.com/ahebrank/refnav","last_synced_at":"2026-04-20T04:04:28.919Z","repository":{"id":48500970,"uuid":"62408229","full_name":"ahebrank/refnav","owner":"ahebrank","description":"Forked sandbox module for entity reference backreference tokens","archived":false,"fork":false,"pushed_at":"2021-07-22T15:49:08.000Z","size":24,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"8.x-1.x","last_synced_at":"2025-05-29T19:05:44.974Z","etag":null,"topics":["drupal","drupal-7","drupal-8","drupal-module"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahebrank.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-01T17:10:18.000Z","updated_at":"2020-09-22T20:38:42.000Z","dependencies_parsed_at":"2022-09-19T08:02:39.281Z","dependency_job_id":null,"html_url":"https://github.com/ahebrank/refnav","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahebrank/refnav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahebrank%2Frefnav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahebrank%2Frefnav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahebrank%2Frefnav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahebrank%2Frefnav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahebrank","download_url":"https://codeload.github.com/ahebrank/refnav/tar.gz/refs/heads/8.x-1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahebrank%2Frefnav/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833281,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal","drupal-7","drupal-8","drupal-module"],"created_at":"2024-10-11T02:24:51.577Z","updated_at":"2026-04-20T04:04:28.886Z","avatar_url":"https://github.com/ahebrank.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Referential Navigation\n======================\n\nForked from https://www.drupal.org/sandbox/dman/2209055; see discussion on https://www.drupal.org/node/1815276\n\nConstruct pathauto and breadcrumb rules for structures that are held together \nwith entity reference links.\n\nFor those that don't like 'menus' or 'books' and their hierarchical structure,\nthis strategy assumes a site structure where one content type (Publication Series) may\nrefer to another content type (Publication Issue) and that may refer to another\n(Publication Article). \n\nThe URL patterns need to reflect the heirarchy, even though each layer is\nnot a menu or anything. To achive this, a pathauto token of '[referers-path]'\nwitll return the PATH OF THE ENTITY THAT LINKS TO THIS ONE (effectively the parent node).\nChaining these together should produce a meaningful URL hierarchy.\n\nAdditional side effects are triggered such that :\n* whenever a parent item is renamed, the paths of each of its children are \n  rebuilt\n* whenever a parent item is published, each child item is published. \n\nOriginally built for NIWA on Drupal6 with a lot of customizations, refactored \nin D7 to be less ad-hoc, and adapted for D8.\n\nBehavior\n--------\n\nIncoming reference Token\n------------------------\n\nThis makes a new token tree available called \"incoming_references\":\n\n[node:incoming_references:field_child_pages:0:*]\n\nUnderneath 'incoming_references:' will be each fieldname for any entity reference\nthat may refer *to* the current node context (i.e., the field on the parent referencing the current node).\n\nThe next part of the token path is a numeric index, as there may be many \nincoming references and you may just want the first (sort order is undetermined).\n\nAt that point you can access the token tree of the entity type that may be \nfound by that lookup, eg 'title' for a referring node.\n\nEdit propogation\n----------------\n\nEditing a parent may be expected to produce effects on the children.\n\nUsage\n-----\n\nGiven a content type that links to 'child' pages via an entityreference field\ncalled 'child_pages', \nThe pathauto rules for child pages may be set as\n\n  [node:incoming_references:field_child_pages:0:url:path]/[node:title]\n  \nto use the first parents path as a base.\n\nNotes\n-----\n\n* This does not use or require entity_tokens.module, though it should not clash.\n\n* The database lookup fo rthe reverse relationship may need to be improved\n  as it doesn't use the full field API. \n  An alternative is adding views as a dependency and just getting views to run\n  the lookup for us.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahebrank%2Frefnav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahebrank%2Frefnav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahebrank%2Frefnav/lists"}