Find out where a document is used

Hi,

Is it possible to find out on which sites (with url) a document is used?
How can I do this?

Kind regards
Peter

Hi,
if with sites you mean channels, then the easier way is to use the view button in the document editor [1]

About the url, you can print the document url (aka HST link [2]) directly in your in templates.

For more advanced usage of document urls, you can play with the HST link creator [3]

[1] https://www.onehippo.org/library/concepts/channels/view-a-document-in-a-channel.html
[2] https://www.onehippo.org/library/concepts/links-and-urls/hst-2-urls.html
[3] http://javadoc.onehippo.org/12.0/hippo-site-toolkit/org/hippoecm/hst/core/linking/HstLinkCreator.html

giacomolm

    November 17

Hi,

if with sites you mean channels, then the easier way is to use the view button in the document editor [1]

bit more info, [1] is using a call to [3] to find all the possible URLs for a document

Regards Ard

Thanks @giacomolm and @ard.schrijvers. But if I use the method which is described in [1] and call f.e. http://127.0.0.1:8080/site/_cmsrest/documents/8f5a3a3c-3abb-41e8-8c43-8dfc10e237fc/channels I get this error:

Cannot proceed _cmsrest request: header 'X-CMS-CS-ID' missing

What do I need to do to get this working?

Thanks.
Peter

Hey Peter,

you can only use that rest call in the context of the cms (you need an SSO)

Most likely you want to get all the URLs for a document in your site webapp code, right? In that case you need to use the HstLinkCreator api (something like get all canonical links)

HTH,

Regards Ard

1 Like

Hi,

thanks for your information.
A colleague already opened an issue in the JIRA Board. The answer was that there is no way to get all URLs where a document is used except the document is the primarydocument of the page in the channel manager.

Is there no other way to get the URLs?

Kind regards
Peter