Yes Scott is correct. Multifield is used to run on author and input the content to the dialog of the component.
It is not used on publish.
Maybe I'm mistaking what a content fragment model is, but isn't creating a content fragment an authoring action? If you create a content fragment based on a content fragment model, is this not akin to adding data to the repository via a component's dialog?
A content fragment once built - runs on Publish. Therefore Granite APIS are not used within them.
Here is a good article on Content Fragments -- Adobe Experience Manager Help | Working with Adobe Experience Manager Content Fragments
I understand the content fragment runs on Publish, but it's still created in the authoring environment? A content editor wouldn't create it on the publisher, right?
Correct - as discussed in the article - they are created on Author. A component used in a content fragment can have a dialog - where you can use all grainte data types - including MF.
If that's the case then, I thought a content fragment model is essentially just a dialog for creating the content fragment (in the author).
If you look at this illustration--
A component can be part of a Content Fragment. That component can have a dialog which is used to populate that component with data.
Therefore a Multifield can be part of the component dialog - which renders content that is displays within the Content Fragment. However - a MF cannot be used within the Fragment itself.
I hope this clear its up.
Maybe it would be better to give some context to what we are trying to do. At the moment, to create some content, an editor would add a component to a page then populate it with some values via a dialog. The component then renders those variables appropriately.
We may want multiple instances of the same component across our site where the data within those components is the same. At the moment, to do this we would either add the component to each page and configure them individually via a dialog, or we could create one then copy and paste it onto other pages. The problem with these two methods is that if we want to change a value in that repeated component, we need to repeat the work for each instance on each page.
Our intention to improve this process was to separate the dialog and the view in the component from each other. We would create a content fragment as a central source of the data we wanted to display then create a component that we would point to that fragment and render it.
When creating the content fragment, we want the editors to enter data in a structured format (as they would in a dialog) and we identified content fragment models as a way to do that. It's in these models that I was hoping I could add a multifield; as it stands, these are the only field types available:
Just to summarize what i meant - here is a content fragment example - you can build by following: Adobe Experience Manager Help | Working with Adobe Experience Manager Content Fragments
You can see component on the left (in red) and content fragment on the right.
What i meant was you can use a Multi-field in a component dialog that you drop onto a content fragment. That is the only role i see a Multifield playing while using a Content Fragment.
I have a similar question while creating content fragment model currently we have "single-line-field", "multi-line-field" etc. Is it possible to create another data type similar to multi-field. For example in the fragment model I want to list down N number of links.