Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Type: taxonomy field doesn't read current values

Started by P. Fighter 8 years ago · 7 replies · 546 views
8 years ago

So, I have a custom field using the taxonomy type. When I enter information into the field and save the page, the header is updated with the correct values, but the field doesn't show the values saved when reloading the page... Any idea why?

8 years ago

No, I've called it header.jombo (ridiculous nonsense word) exactly for that reason (to not cause collisions with existing variables).

YAML
        header.jombo:
          label: Tags
          type: taxonomy
          validate:
            type: array
last edited 04/10/18 by P. Fighter
8 years ago

Try to use it this way:

YAML
        header.jombo:
          label: Tags
          type: selectize
          classes: fancy
          validate:
            type: commalist
8 years ago

Well, that works, but it doesn't autofill the existing tags which is somewhat important as I can't expect the end user to remember them all (there are quite a few)...

8 years ago

You mean it doesn't autofill it like the default taxonomy field under "Options" tab?

8 years ago

Exactly right. Editors can't possibly know all current tags in use, so the field needs to autofill them.

8 years ago

Seems like built-in taxonomy uses something else, if you figure out, please, comment here.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 82 12 hours ago
General · by pamtbaau, 17 hours ago
1 55 16 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 348 5 days ago
General · by Duc , 5 days ago
3 43 5 days ago