Skip to content

Commit 8182fb0

Browse files
committed
#1296 : Enrich Item object with extended properties.
1 parent acc0f5f commit 8182fb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Spe/Core/Host/ScriptSession.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ public void SetItemLocationContext(Item item)
832832
{
833833
if (item == null) return;
834834

835-
SetVariable("SitecoreContextItem", item);
835+
var psObject = ItemShellExtensions.GetPsObject(Engine.SessionState, item);
836+
SetVariable("SitecoreContextItem", psObject);
836837

837838
Engine.SessionState.Path.SetLocation(item.GetProviderPath());
838839
}
@@ -854,7 +855,8 @@ public void SetItemContextFromLocation()
854855

855856
if (item != null)
856857
{
857-
SetVariable("SitecoreContextItem", item);
858+
var psObject = ItemShellExtensions.GetPsObject(Engine.SessionState, item);
859+
SetVariable("SitecoreContextItem", psObject);
858860
return;
859861
}
860862
}

0 commit comments

Comments
 (0)