Facet navigation

44 views
Skip to first unread message

Marco Di Sabatino Di Diodoro

unread,
Apr 18, 2016, 3:46:51 PM4/18/16
to Hippo Community, Marco Di Sabatino Di Diodoro
Hi all,

I have to implement a faceted navigation that allows me to have the documents in different folders. I configured my sitemap as follows:

result [hst:sitemapitem] { hst:componentconfigurationid=hst:pages/result-list, hst:relativecontentpath=resultfolder-/facet-result }
_default_.html [hst:sitemapitem] { hst:componentconfigurationid:hst:pages/result-page, hst:relativecontentpath=resultfolder-/facet-result/hippo:resultset/${1}.html  }

where result/item.html returns the single element.
When my sitemap matches result, it returns the resultset of the facet and the links to the documents are not correct. I try with navigationStateful but it doesn't work. I think that the problem is caused by the hst:relativecontentpath property. How can I solve this problem? Any suggestions?

Regards
M

Ard Schrijvers

unread,
Apr 20, 2016, 4:13:15 AM4/20/16
to hippo-c...@googlegroups.com, Marco Di Sabatino Di Diodoro
Hey Marco,
the hst:relativecontentpath starts with 'resultfolder-', is that perhaps a typo?

If you need a working example, pls let me know, then I can point you
to how you can check it in the testsuite

Regards Ard

>
> Regards
> M
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-c...@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hippo-communi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.



--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
states of America.

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

Marco Di Sabatino Di Diodoro

unread,
Apr 20, 2016, 5:07:25 AM4/20/16
to Hippo Community, marco.di...@tirasa.net


Il giorno mercoledì 20 aprile 2016 10:13:15 UTC+2, a.schrijvers ha scritto:
Hey Marco,

On Mon, Apr 18, 2016 at 9:46 PM, Marco Di Sabatino Di Diodoro
<mdisabatin...@gmail.com> wrote:
> Hi all,
>
> I have to implement a faceted navigation that allows me to have the
> documents in different folders. I configured my sitemap as follows:
>
> result [hst:sitemapitem] {
> hst:componentconfigurationid=hst:pages/result-list,
> hst:relativecontentpath=resultfolder-/facet-result }
> _default_.html [hst:sitemapitem] {
> hst:componentconfigurationid:hst:pages/result-page,
> hst:relativecontentpath=resultfolder-/facet-result/hippo:resultset/${1}.html
> }
>
> where result/item.html returns the single element.
> When my sitemap matches result, it returns the resultset of the facet and
> the links to the documents are not correct. I try with navigationStateful
> but it doesn't work. I think that the problem is caused by the
> hst:relativecontentpath property. How can I solve this problem? Any
> suggestions?

the hst:relativecontentpath starts with 'resultfolder-', is that perhaps a typo?

If you need a working example, pls let me know, then I can point you
to how you can check it in the testsuite

Thanks for your reply. Yesterday I dowloaded testsuite and saw the facet navigation sample. Now it works.
My site works only with faceted navigation, currently all canonical URLs are generated with an "pagenotfound"? We are thinking of overriding the DefaultHstLinkCreator, is this the right way to generate the canonical URLs for faceted navigation?

Thanks
M
 

Ard Schrijvers

unread,
Apr 20, 2016, 5:35:37 AM4/20/16
to hippo-c...@googlegroups.com, Marco Di Sabatino Di Diodoro
On Wed, Apr 20, 2016 at 11:07 AM, Marco Di Sabatino Di Diodoro
I don't think you'll manage to have your application 'know' the right
faceted navigation location for a document. Namely, a document exposed
in a faceted navigation context can be exposed on *many* different
URLs. Typically with fac nav, you can drill down in endless ways to a
document. If that is the only way to get to a document, search engines
won't be very good at indexing (crawling) your site. Also, if the same
page is shown on many different URLs, you need to 'tell' the search
engine what the canonical URL is for the page, see [1]. Perhaps you
have a usecase where you can only drill down in one way to a document,
but the HST can't know how to create a link for such a document.

My advice is to also support the canonical location of documents next
to a faceted location (and from the facet nav tell what the canonical
url of the page is for search engines)

Regards Ard

[1] https://support.google.com/webmasters/answer/66359?hl=en

Marco Di Sabatino Di Diodoro

unread,
Apr 20, 2016, 6:32:23 AM4/20/16
to Hippo Community, marco.di...@tirasa.net

 
In my usecase, I'm implementing a faceted navigation over taxonomy, now I can generate my canonical url for a document by taking the assigned taxonomy with the shortest path. Is it a good approach to extend the DefaultHstLinkCreator class?

Thanks
Marco
 

Ard Schrijvers

unread,
Apr 21, 2016, 3:43:43 AM4/21/16
to hippo-c...@googlegroups.com, Marco Di Sabatino Di Diodoro
On Wed, Apr 20, 2016 at 12:32 PM, Marco Di Sabatino Di Diodoro
It is not really designed to be extended. You can try how far you get.
You might have to replace the entire link creator implementation with
one of your own, but you are on thin ice I am afraid

Regards Ard
Reply all
Reply to author
Forward
0 new messages