Enonic XP 6.10 - App name in content type definition

Enonic version: XP 6.10
OS: Centos 6

When defining an input in a content type, f.eks:

<input type="ContentSelector" name="target">
  <label>Target</label>
  <occurrences minimum="0" maximum="0"/>
  <config>
    <relationshipType>system:reference</relationshipType>
    <allowContentType>no.sample.web:category</allowContentType>
    <allowContentType>no.sample.web:allergen</allowContentType>
    <allowContentType>no.sample.web:item-subselection</allowContentType>
    <allowContentType>no.sample.web:item</allowContentType>
  </config>
</input>

the app name “no.sample.web” is hardcoded. How can I instead of hardcoding use the current app name like i JS: app.name?

Thanks for any help.

Hi,

For current app there is no need to define the app name at all. For cross linking between apps you need to define its name like in your example.

If your example content type is inside no.sample.web the same input type could be defined like this:

<input type="ContentSelector" name="target">
  <label>Target</label>
  <occurrences minimum="0" maximum="0"/>
  <config>
    <relationshipType>system:reference</relationshipType>
    <allowContentType>category</allowContentType>
    <allowContentType>allergen</allowContentType>
    <allowContentType>item-subselection</allowContentType>
    <allowContentType>item</allowContentType>
  </config>
</input>
3 Likes