Reputation: 99
I'm trying to create a dynamic page type field, it should able to access correct "Settings" folder to capture the Data Item based on the root (Finance or Procurement):
Let's say the page type being used under Finance, the field should go to 'Finance/Setting/(whatever)'.
What I have done is 'hardcode' the path:
I have tried CurrentDocument.DocumentAliasPath, GetDocumentUrl() and so on, it doesn't show anything on the dropdown.
Is there any way to directly get the "Root(Finance or Procurement)" or indirectly get (Chopped from URL, or get URL using GUID)?
Thank you!!
Upvotes: 0
Views: 565
Reputation: 287
In page type fields you can use DocumentContext.EditedDocument
object to get current page and it's properties. So you can use the following property to get current node name
Upvotes: 1