How can I use 'auto-filename' without 'internal-name' in Crafter?

46 views Asked by At

When you have auto-filename as the content type’s "Component ID", I remember when creating a new instance from that type, the "internal-name" is auto populated with the generated uuid by default. That behavior seems to have been removed in Crafter Studio 3.1, leaving "internal-name" blank and force the author to give it a name.

How do I get Studio to also automatically set 'internal-name' to the same generated uuid value?

1

There are 1 answers

0
Michael Chen On

I got it. I can uncheck “Required” for "internal-name" in the content type, and Studio will fall back to the value in the XML, which is the uuid. I just didn't realize that "internal-name" is optional. The resulting XML looks like this:

<component>
  ...
  <objectId>db99f900-a57f-7b32-eb7f-ddc6e5565423</objectId>
  <file-name>db99f900-a57f-7b32-eb7f-ddc6e5565423.xml</file-name>
  <internal-name/>