סוגי אובייקטים להגדרת נושא

Narrator: “It was not landed that week.” :upside_down_face:

2 לייקים

Is there any change on this? I just re-wrote a component for someone using objects type and they are unhappy that they can’t reorder.

4 לייקים

האם זה יופיע ברשימה של מישהו בקרוב?

בנוסף, זה די נורא שכולם נקראים “field_name-X”. האם ניתן יהיה להשתמש בשם שדה שניתן להשתמש בו שם? הצורך ללחוץ על כל אחד מהם כדי לראות מה יש שם זה סיוט אם יש לך יותר מכמה אובייקטים.

אם איננו יכולים לסדר מחדש את הפריטים ואינך יכול לדעת מה הם מבלי ללחוץ עליהם, סביר להניח שאצטרך לחזור לשימוש בהגדרת מחרוזת אחת עם ערכים מרובים המופרדים על ידי, אה, תו כלשהו להפרדת השדות השונים. ואני חושב שבמערכים מהסוג הישן יכולת לסדר דברים מחדש, נכון? אז סוג האובייקטים הזה נראה כמו צעד אחורה לכולם מלבד מתכנתים.

2 לייקים

I don’t think there’s anything in process for reordering at the moment, though it’s still something we’d like to include. Renaming is already possible with the identifier property. For example, from the custom header links theme component

The name field is set as the identifier for each link, so you can see which link is which

2 לייקים

Hooray. I thought I must have overlooked that but have not managed to find it before. Thanks!

EDIT: And now I used the identifier property and added an ‘order’ field, so it’s not too bad. I still think being able to reorder settings would be nice, and it’s available with arrays. . .

Thanks again for your help

לייק 1

I made a commit a bit ago that adds re-ordering for objects. Here is a little test setting to show the buttons:

9 לייקים

I think it is worth announcing that we got uploads as a field type option now, and I think it was mentioned somewhere, but it is nice to mention again that type: objects works on both theme settings and in site settings(plugins)

9 לייקים