Create project item references.
More...
|
T | GetTarget (Node context) |
| Gets the node to which a relative node reference points. More...
|
|
Create project item references.
See NodeReference and ResourceReference.
- Template Parameters
-
◆ GetTarget()
T GetTarget |
( |
Node |
context | ) |
|
Gets the node to which a relative node reference points.
- Parameters
-
context | The node that you use to resolve the relative path to the target node. |
- Returns
- The node to which a relative node reference points.
Examples
To get the node to which a relative node reference points:
public void Execute(PluginCommandParameter parameter)
{
var rootPage = studio.ActiveProject.GetProjectItem("Screens/Screen/RootPage");
var introPage = studio.ActiveProject.CreateProjectItem<Page>(rootPage.GenerateUniqueChildName("Intro"), rootPage);
studio.ActiveProject.CreateProjectItem<Page>(rootPage.GenerateUniqueChildName("Main"), rootPage);
ProjectItemReference<ExportedPropertyContainerItem> routingTarget = new NodeReference<Page>("../Main");
var target = routingTarget.GetTarget(introPage);
studio.Log(target.Path);
}
◆ IsAbsoluteReference
Gets whether a project item reference is an absolute reference.