Can Data Files Access Page Attributes?

I’m testing out using a system where my shared markdown content is stored in /data/shared/... and displayed in my content folder across different release versions using a readfile shortcode. for example:

/content/latest/auth/log-in.md
/content/latest/getting-started/log-in.md
/content/2.3.x/auth/log-in.md
/content/2.3.x/getting-started/log-in.md

Sometimes the content in the data/shared modules have relative links to other locations in that particular version’s collection. I’d like to be able to access the page’s attributes where the module is being displayed to help give the links context.

Example:

- You must have an [IdP Connector](/{{% release %}}/set-up/auth/authentication/connectors) set up. 

Is there a way to do this? If not, is there another technique you recommend for multi-versioned docs?