1

Hi whenever i try to create the new product category in hybris product cockpit i create the identifier, name and the correct catalog version which is Online

but when i try to edit the navigation of the website im currently lost where do i find the url of that specific category so when the user click on that navigation it will filter on which category of the product is tagged

3
  • I'm voting to close this question as off-topic because this does not appear to be a programming question at all.
    – vwegert
    Feb 7, 2017 at 8:47
  • The mapping in CategoryPageController is /**/c + the path variable with categoryCode so by default you can access your category by entering <whatever>/c/{categoryCode}
    – qwerty1423
    Feb 7, 2017 at 9:05
  • @qwerty1423 thanks for this answer, basically what i did is to remember the identifier of the category and the category name itself thanks for this again
    – Derek Anas
    Feb 8, 2017 at 9:34

1 Answer 1

1
  • If your navigation menu is composed of CMSLinkComponents you are lucky, because CMSLinkComponent was already made to handle this, you have just to :

    1. create a new CMSLinkComponent.
    2. Attach the new create Category to the CMSLinkComponent.
    3. Then add this CMSLinkComponent to your navigation menu. (that's all what you need to do).

enter image description here

  • However if you don't use CMSLinkComponent, you can use the defaultCategoryModelUrlResolver.resolve(newCategory) to generate the URL of the category and then send it back to the Front to be printed.

  • Or just print it like this in your jsp file :

    <c:url var="categoryUrl" value="/c/${newCategory.code}" /> <a href="${categoryUrl}">${newCategory.name}</a>

1
  • Thank you for this answer. currently what i did is to remember the identifier of the category <name of the category>/c/<category identifier>
    – Derek Anas
    Feb 8, 2017 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.