Aller au contenu principal

how to get a pageref from a site store folder?

Commentaires

3 commentaires

  • Zendesk API User
    Author: seegers - 6/8/2020 10:31

    Hi Yamini,

    your question needs a little more clarification, since a folder can contain multiple pages, it is not clear, from which page you want to extract the metadata from.

    I would assume that you want to extract it from the folder's startpage. In this case, the following methods will help you find that page:

    SiteStoreFolder (FirstSpirit Access-API) :

    - findStartNode

    - getStartNode 

    Cheers,

    René

    0
  • Zendesk API User
    Author: Yamini - 6/8/2020 10:46

    Hello Rene,

    We are setting the metadata on a folder level in Page store, and the metadata is inherited in the pages under that folder.

    In case a page ref is linked from the site store , I am easily able to access the page from the pageref to get to the metadata.

    So my question here is, if a site store folder is linked how do i go to its corresponding page folder if possible

    Or

    How can i get to (any) page ref belonging to that folder (since we inherit the same metadata in all children pages), so that i can get the page and the metadata again.

    Please let me know if I need to provide some more clarification.

    Many thanks!

    0
  • Zendesk API User
    Author: seegers - 6/8/2020 11:12

    > if a site store folder is linked how do i go to its corresponding page folder if possible

    I believe there is no "corresponding page folder", as the structures in the SiteStore and PageStore can be entirely different. Though depending on the content strategy, they are often very similar.

    Imagine a site-store folder containing three pagerefs to three pages in different page-store folders. Then it would be difficult to define, which folder is the corresponding one.

    But if your structure basically mimics the same structure in both stores, then just select any page (getFirstChild of type PageRef) or get the startNode from the sitestore folder. I would recommend the second one, as there is always either a startnode or no pageref at all in a folder. This relies also on the constraint, that the folder structures remain similar.

    Another option might be to disallow selecting folders in your FS_Reference.

    Cheers,

    René

    0

Vous devez vous connecter pour laisser un commentaire.