Skip to Content
0
Jan 26, 2016 at 05:24 PM

CMS Cockpit - Editor - Show Item Name for Link Name

336 Views

The problem: We would like to show CMSItem.name in place of CMSLinkComponent.linkName in our editor for our content editors.

In our CMS Cockpit we have CMSLinkComponent. When the Component is displayed in the Editor, it shows CMSLinkComponent.linkName that is the same across all links for some business reason. For us, that label is "Learn More" (for en_US). They use that on the consumer site per product link.

However, in the CMS the content editors only see this "Learn More" in the editor in the CMS and it is not descriptive enough for them without clicking in to see what the link is. A more descriptive title for them is CMSItem.name -- the functional name of the link. They would like that to show in the editor, instead of CMSLinkComponent.linkName to make their editing work easier.

Note that for this issue the CMSLinkComponent is an object embedded in our EditorialTextImageComponent on a property called "editorialAction" -- which displays the component's link name and some buttons in the cmscockpit.

Also -- if the new label shows the catalog as it does now, that is OK.

Attached: graphic of desired change.

alt text

I have tried several techniques with help from team members which include:

1. changing the configuration in our items xml config:

         <itemtype code="EditorialTextImageComponent" generate="true"
             jaloclass="com.loopintegration.core.components.EditorialTextImageComponent" extends="CMSParagraphComponent"
             autocreate="true">
             <attributes>
                 <attribute qualifier="divClass" type="localized:java.lang.String">
                     <persistence type="property" />
                     <description>Specify style class for div to wrap this component in</description>
                     <modifiers read="true" write="true" />
                 </attribute>
                 <attribute qualifier="editorialTitle" type="localized:java.lang.String">
                     <persistence type="property" />
                     <description>Editorial Title</description>
                     <modifiers read="true" write="true" />
                 </attribute>
                 <attribute qualifier="editorialImage" type="localized:java.lang.String">
                     <persistence type="property" />
                     <description>Editorial Image</description>
                     <modifiers read="true" write="true" />
                 </attribute>
                 <attribute qualifier="editorialAction" type="CMSLinkComponent">
                     <description>Editorial Action</description>
                     <persistence type="property" />
                 </attribute>
             </attributes>
         </itemtype>

2. changing its entry in various component configuration files (like this config for EditorialTextImageComponent , the entry "editorialAction" contains the CMSLinkComponenet."

 <?xml version="1.0" encoding="UTF-8"?>
 <content-editor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="content-editor.xsd"
                 hideEmpty="true" hideReadOnly="true" groupCollections="true">
     <template>
     <![CDATA[
         <table width="100%" style="margin:0px;padding:0px" class="structViewCnt">
             <tbody>
                 <tr>
                     <td colspan="2"><div style="height:6px"/></td>
                 </tr>
                 <tr>
                     <td><cockpit code="property" value="EditorialTextImageComponent.divClass"/></td>
                     <td><div style="height:6px"/></td>
                 </tr>
                 <tr>
                     <td><cockpit code="property" value="EditorialTextImageComponent.editorialTitle"/></td>
                     <td><div style="height:6px"/></td>
                 </tr>
                 <tr>
                     <td><cockpit code="property" value="EditorialTextImageComponent.editorialImage"/></td>
                     <td><div style="height:6px"/></td>
                 </tr>
                 <tr>
                     <td><cockpit code="property" value="EditorialTextImageComponent.editorialAction"/></td>
                     <td><div style="height:6px"/></td>
                 </tr>
                 <tr>
                     <td><cockpit code="property" value="CMSParagraphComponent.content"/></td>
                     <td><div style="height:6px"/></td>
                 </tr>
             </tbody>
         </table>
     ]]>
     </template>
     <custom-editors>
         <property qualifier="EditorialTextImageComponent.editorialAction" editorCode="default">
             <parameter>
                  <name>editable</name>
                  <value>true</value>
              </parameter>
             <parameter>
                 <name>allowCreate</name>
                  <value>true</value>
             </parameter>
              <parameter>
              <name>showEditButton</name>
              <value>true</value>
             </parameter>
         </property>
     </custom-editors>
 </content-editor

Attachments