Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Individual Tracking setting in template #1663

Closed
sp1r1t opened this issue Jan 10, 2024 · 2 comments
Closed

Access Individual Tracking setting in template #1663

sp1r1t opened this issue Jan 10, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sp1r1t
Copy link

sp1r1t commented Jan 10, 2024

Is it possible to access the setting of individual tracking from the template?

I imagine this in the style as it is done for e.g. AllowPreferences.

{{ if .Data.AllowPreferences }}

I would like this to adapt the subscribe disclaimer in accordance to be compliant with GDPR.

@sp1r1t sp1r1t added the question Further information is requested label Jan 10, 2024
@sp1r1t sp1r1t changed the title Access IndividualTracking setting in template Access Individual Tracking setting in template Jan 10, 2024
@sp1r1t
Copy link
Author

sp1r1t commented Jan 10, 2024

I am not proficient in Go. From the code it looked to me as if {{ if .Data.IndividualTracking }} should work. But I'm getting the following error:

handlers.go:62: template: subscription.html:27:14: executing "optin" at <.Data.IndividualTracking>: can't evaluate field IndividualTracking in type interface {}

So it seems the field is not defined on Data.

@knadh
Copy link
Owner

knadh commented Jan 11, 2024

IndividualTracking is not exposed to the template currently. I'll add it in a patch shortly and make it available in the next release (which should be out next week).

@knadh knadh self-assigned this Jan 11, 2024
@knadh knadh removed the question Further information is requested label Jan 11, 2024
@knadh knadh assigned knadh and unassigned knadh Jan 11, 2024
@knadh knadh added the enhancement New feature or request label Jan 11, 2024
@knadh knadh closed this as completed in 6cb9982 Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants