0

We want to display custom menu buttons in a document set. We haven't found a solution, through SPFx, which gives us information that the user is inside a document set. Neither Url or _sppageContextInfo object contains this information.

If there any way to get this information through SPFx?

2
  • are you using a classic view or a modern view? Apr 25, 2021 at 23:29
  • I am using a modern view.
    – Maddy
    Apr 26, 2021 at 9:48

1 Answer 1

1

Looks like Anita has a viable suggestion described in her article. It's not the prettiest, but it seems to be working.

Basically you check:

  • if your current list contains a specific content type. In your case it's Document set
  • check if the currently selected document has a specific content type. In your case it's a document.

The full article is here: SPFx associate listview command set to a content type.

0

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.