Categories
A Categories feed describes your category pages. It plays two roles:
<category> value on a product/article
is matched against the hierarchy field here. Without a Categories
source, those category names are still indexed but have no URL.Register the feed as a source of type Categories.
<categories><category> (zero or more)<?xml version="1.0" encoding="UTF-8"?><categories><category><name>OTC medicines</name><url>https://shop.example.com/c/otc-medicines</url><hierarchy>Pain & fever | OTC medicines</hierarchy><image_link_s>https://shop.example.com/img/otc-s.jpg</image_link_s><image_link_m>https://shop.example.com/img/otc-m.jpg</image_link_m><image_link_l>https://shop.example.com/img/otc-l.jpg</image_link_l></category></categories>
<!ELEMENT categories (category*)><!ELEMENT category (name, url, hierarchy, image_link_s?, image_link_m?, image_link_l?)><!ELEMENT name (#PCDATA)><!ELEMENT url (#PCDATA)><!ELEMENT hierarchy (#PCDATA)><!ELEMENT image_link_s (#PCDATA)><!ELEMENT image_link_m (#PCDATA)><!ELEMENT image_link_l (#PCDATA)>
Children must appear in the order shown above.
| Element | Required | Type | Searched | Meaning |
|---|---|---|---|---|
name | yes | text | yes | Display name of the category (e.g. "OTC medicines"). Full-text and prefix searchable. |
url | yes | text | no | Link to the category page. This is the URL attached to products/articles whose category matches this entry's hierarchy. |
hierarchy | yes | text | no | Full category path, used as the match key. Conventionally a |-separated path from root to leaf (e.g. "Pain & fever | OTC medicines"). A product/article <category> must contain this exact string to resolve to this entry's url. |
image_link_s | no | text | no | Small image URL. |
image_link_m | no | text | no | Medium image URL. |
image_link_l | no | text | no | Large image URL. |
Keep hierarchy consistent across feeds. The value a product or
article puts in <category> must equal this hierarchy verbatim —
including spacing and separators — or the link will not be resolved.