diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 70c229380..b735c4bc4 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.10.19 + - Added ability to pass caller assetId to RenderThingMacro 7.10.18 - fixed #12138: Version tag gets create by entering and direct leaving diff --git a/lib/WebGUI/Asset/Wobject/Thingy.pm b/lib/WebGUI/Asset/Wobject/Thingy.pm index b5192cf96..9f52988a5 100644 --- a/lib/WebGUI/Asset/Wobject/Thingy.pm +++ b/lib/WebGUI/Asset/Wobject/Thingy.pm @@ -3933,6 +3933,7 @@ sub www_viewThingData { my $thingId = shift || $session->form->process('thingId'); my $thingDataId = shift || $session->form->process('thingDataId'); my $templateId = shift || $session->form->process('templateId'); + my $callerAssetId = shift || $session->form->process('callerAssetId'); my $var = $self->get; my $url = $self->getUrl; my $i18n = WebGUI::International->new($self->session, "Asset_Thingy"); @@ -3945,6 +3946,7 @@ sub www_viewThingData { $var->{"addThing_url"} = $session->url->append($url, 'func=editThing;thingId=new'); $var->{"manage_url"} = $session->url->append($url, 'func=manage'); $var->{"thing_label"} = $thingProperties->{label}; + $var->{"callerAssetId"} = $callerAssetId; if($self->hasPrivileges($thingProperties->{groupIdEdit})){ $var->{"edit_url"} = $session->url->append($url,'func=editThingData;thingId=' diff --git a/lib/WebGUI/Macro/RenderThingData.pm b/lib/WebGUI/Macro/RenderThingData.pm index 13625ff83..d5d1d723c 100644 --- a/lib/WebGUI/Macro/RenderThingData.pm +++ b/lib/WebGUI/Macro/RenderThingData.pm @@ -38,7 +38,7 @@ Optional. Specifies the templateId or template url to use. If omitted, the def #------------------------------------------------------------------- sub process { - my ($session, $thingDataUrl, $templateHint ) = @_; + my ($session, $thingDataUrl, $templateHint, $callerAssetId ) = @_; my $i18n = WebGUI::International->new($session, 'Macro_RenderThingData'); return $i18n->get('no template') if !$templateHint; @@ -57,7 +57,7 @@ sub process { return ( $i18n->get('bad url') . $thingDataUrl ) if !$thing || !$thingId || !$thingDataId; # Render - my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint ); + my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint, $callerAssetId ); # FIX: Temporary solution (broken map due to template rendering