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

Add warning about using existing tag names for taxonomies #1403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steveparks
Copy link
Contributor

@steveparks steveparks commented Jul 8, 2024

At the moment there is no disambiguation between tags for taxonomies and tags for system tags within views.

So a taxonomy called 'Section' can't be referenced as {{ section }} <li> ... </li> {{ /section }} in views because it conflicts with the existing Statamic system tag {{ section }}.

There is a way to disambiguate between variables and tags, but not between types of tags.

I've submitted an idea to provide this disambiguation: statamic/ideas#1195

But in the meantime, I suggest adding this warning to the taxonomy page to avoid people getting in a pickle.

@sjclark
Copy link
Contributor

sjclark commented Jul 18, 2024

To be fair Statamic does advise not to use the names of tags as field names, but maybe that should be expanded to be a bit broader (beyond just field names). Generally using the same names in various places is probably going to break something eventually 😂 https://statamic.dev/tips/reserved-words

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants