Add a linked component using Tridion UI/XM

786 views Asked by At

We are currently implementing a new site with support for the new UI/XM (Experience Manager). Currently though it seems not possible to add a 'paragraph' (which is a multivalued embedded schema) to our 'article' components. I imagine such basic functionality to be working.

Also, we have a component that links to multiple other components in a multivalue component link field. These indiviual linked components are editable (they are rendered using RenderComponentPresentation()), but we cannot add new component links to the multivalue field.

Anyone have an idea how to get this working?

Kind Regards

Edit: This will be fixed in 2013 SP1!

3

There are 3 answers

4
Frank van Puffelen On BEST ANSWER

Adding multi-value embedded schemas is currently not a possible in Tridion's Experience Manager UI. I suggest opening the Component in form view to add the paragraph.

If you think it is a good idea for SDL to add the feature you miss, you could suggest it at: http://ideas.sdltridion.com.

3
Jeroen Suurd On

I use this code to render fields of a multi-value embedded Paragraph schema and it works just fine in XPM:

<!-- TemplateBeginRepeat name="Fields.Paragraph" -->
    @@RenderComponentField("Fields.Paragraph[${TemplateRepeatIndex}].Body", 0)@@
<!-- TemplateEndRepeat -->
2
Bart Koopman On

According to the documentation (password required, see http://docportal.sdl.com/sdltridion for details) you should use the following in your DWT template:

<!-- TemplateBeginRepeat name="fieldname" -->
  @@RenderComponentField("fieldname", TemplateRepeatIndex)@@
<!-- TemplateEndRepeat -->

But that isn't so useful for Component Links as it just renders the TCMURI in your template, so you probably want it to become a dynamic link and then you can use the following in your DWT Template:

<!-- TemplateBeginRepeat name="fieldname" -->
  <tcdl:ComponentField name="fieldname" index="${TemplateRepeatIndex}">
    <a href="#" tridion:href="@@Field@@" tridion:type="Component">@@Field@@</a>
  </tcdl:ComponentField>
<!-- TemplateEndRepeat -->

If you require the title of the linked component in that link, you could use the Dreamweaver Get eXtension (DGX) for example.

This will now get you the value of all fields editable, and when you edit one of the fields, you get a green plus button in the upper left corner of the field properties, from where you can add a new value (you will see a delete and move button in the top of the field properties too). field properties of a multi value field in XPM

Please note that if your multi value field is initially empty, you will have to make sure there is a tcdl tag allowing XPM to understand it should show the field edit properties there, you could use something like this for that:

<!-- TemplateBeginIf cond="CollectionLength('Field.Values') == 0" -->
  <tcdl:ComponentField name="${Field.Name}"></tcdl:ComponentField>
<!-- TemplateEndIf -->

See the documentation for more details around inline editing.

EDIT:

It seems I misinterpreted the question a bit, indeed as Frank mentions unfortunately XPM has currently no ability to add multi-value embeddable fieldsets. I was tempted to use the following construct, which allows me to edit all the fields, but the multi-value buttons are missing then (since that is not supported):

<!-- TemplateBeginRepeat name="fieldname" -->
  <tcdl:ComponentField name="fieldname" index="${TemplateRepeatIndex}">
    <!-- TemplateBeginRepeat name="Field.embeddableFieldname1" -->
      @@RenderComponentField(FieldPath+".embeddableFieldname1", TemplateRepeatIndex)@@
      -
      @@RenderComponentField(FieldPath+".embeddableFieldname2", TemplateRepeatIndex)@@
    <!-- TemplateEndRepeat -->
  </tcdl:ComponentField>
<!-- TemplateEndRepeat -->