A small UI component Razor file that defines a SpawnMenuPath component deriving from Panel and exposes a single string property Path for use in markup.
@using Sandbox;
@using Sandbox.UI;
@inherits Panel
@namespace Sandbox
<root>
@Path
</root>
@code
{
public string Path { get; set; }
}