Search code examples
javahippocms

How To add new Item Catalog


I created my component importantTodoItemsListComponent that work fine for me. I attempted to add my component within catalog. When I click on "Add components" button, I do not see anything.

What is my error ?

I created this node:

<sv:node sv:name="hst:catalog" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>hst:catalog</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:uuid" sv:type="String">
    <sv:value>d6b63af3-7d12-4fb6-a755-e42feaf63398</sv:value>
  </sv:property>
  <sv:node sv:name="myhippotodolist-catalog">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>hst:containeritempackage</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:uuid" sv:type="String">
      <sv:value>86b31d0e-851c-4604-a4e0-a3f21eb100c1</sv:value>
    </sv:property>
    <sv:node sv:name="important-todo">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>hst:containeritemcomponent</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:uuid" sv:type="String">
        <sv:value>16197a02-a303-4187-abd5-3b9363cb8c2e</sv:value>
      </sv:property>
      <sv:property sv:name="hst:iconpath" sv:type="String">
        <sv:value>images/catalog/totoro64px.png</sv:value>
      </sv:property>
      <sv:property sv:name="hst:label" sv:type="String">
        <sv:value>Important ToDO</sv:value>
      </sv:property>
      <sv:property sv:name="hst:referencecomponent" sv:type="String">
        <sv:value>hst:components/importantTodoItemsListComponent</sv:value>
      </sv:property>
      <sv:property sv:name="hst:xtype" sv:type="String">
        <sv:value>HST.Item</sv:value>
      </sv:property>
    </sv:node>
  </sv:node>
</sv:node>

Solution

  • It could be that you have added the catalog component in the wrong hst configuration.

    When you open up the channel manager for a channel, new hst configuration with the name -preview is made. I guess you have added the catalog component in /hst:hst/hst:configurations/foo instead of /hst:hst/hst:configurations/foo**-preview**

    Try to move the catalog component to the -preview configuration and see it it shows in the catalog library.

    Good Luck,