4

I am facing the following issue : In my Tridion UI/Experience Manager setup, I have created a content type from a schema with a specific Component template. When I create new content based on this content type, it is added to the page correctly : with the component template I specified.

However, when I add existing content to the page, Tridion seems to select a different component template then the one I defined in my content type.

After some testing, I found out that it takes the oldest component template that is linked to my component's schema.

Is there a way to configure which component template should be used by default when adding existing components ?

Thanks for your help.

Chris Summers
  • 10,153
  • 1
  • 21
  • 46

2 Answers2

3

It always takes the first Component Template that is allowed within the selected region and can be used with the Schema. So you would need to ensure that there is only one option available if you wanted to set it to a specific template.

Peter Kjaer
  • 4,316
  • 13
  • 23
  • It works well when using regions, then, tridion does indeed select the correct template (the first one defined for the region). However, if we don't use regions, is there a way to define which templates to allow then ? – Harald Hoffelinck Jan 04 '13 at 12:57
  • I'm afraid not. In that case, it will just pick the first applicable one out of the lot. – Peter Kjaer Jan 04 '13 at 13:01
  • 1
    @PeterKjaer how does it detect the "first one"? If it's by name one can play with naming conventions. However if it's by ID there's not much one can do... – Nuno Linhares Jan 04 '13 at 14:09
  • 1
    It's by index, based on the response from GetListComponentTemplates. It looks like that list is sorted by URI, which fits with what Harald said in his post ("...takes the oldest component template") – Peter Kjaer Jan 04 '13 at 14:23
  • Would it make sense to "remake" templates to change the order or is GetListComponentTemplates something we could extend/override/implement? – Alvin Reyes Jan 04 '13 at 16:31
  • 1
    You can overwrite any request/response in a Data Extender. – Peter Kjaer Jan 07 '13 at 08:47
1

I think Regions would be your best option to control adding components, since they define a "Content Type" in the general-Component Presentation-sense of the term. Add a component and the region allows it with a defined schema.

"Content Types," as defined in a publication, have a very similar concept to regions (Schema + Component Template), but also include:

  • Content Type Title
  • Content Type Description
  • Content Title
  • Prototype Component
  • Storage Location

Making and using these Content Types gives you the option to let authors quickly add content based on some prototype, but they're not directly related to the Component + Template in regions.

I like your idea for making the Component Template options easier to configure. Consider submitting it on the Ideas site.

In the meantime, consider adding one region surrounding your "main content" area to control how components get added.

Alvin Reyes
  • 2,889
  • 16
  • 38