Domanda

How do I display the name/title of the component to the editor/author, so they can see which component they're editing?

È stato utile?

Soluzione

Ensure your component has a "_cq_editConfig.xml" file, which contains the following:

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
      cq:actions="[text:Your Component Name,-,edit,delete,copymove,-,insert]"
      cq:dialogMode="floating"
      jcr:primaryType="cq:EditConfig">
</jcr:root>

Notice in the cq:actions property, you can enter a name for your component.

Altri suggerimenti

In _cq_editConfig.xml file, cq:actions property can be used to give component name and other buttons options.

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    cq:actions="[text:[Component Name],editannonate,-,copymove,delete,-,insert]"
    cq:dialogMode="floating"
    cq:disableTargeting="{Boolean}true"
    cq:inherit="{Boolean}true"
    cq:layout="editbar"
    jcr:primaryType="cq:EditConfig"/>

Also, If you want to disable right click behavior on component and show an edit bar, use property cq:layout="editbar"

Actions sequence can be changed. Actions are separated by comma (,). For a separator between actions use "-".

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top