[ljcom] r12121: LJSUP-12301: Additional refactoring of c...
Committer: vtroitsky
LJSUP-12301: Additional refactoring of common parts with Selfpromo. Preview updated for new common format of get_templates_params.U trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm 2012-06-15 11:32:43 UTC (rev 12120)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm 2012-06-15 12:02:14 UTC (rev 12121)
@@ -255,12 +255,12 @@
) or die "Can't open template: $!";
# Fill in data required to show the item
- my $data = $promoted_object->get_template_params();
+ my $data = { 'object' => [ $promoted_object->get_template_params() ],
+ 'country' => $slot->region,
+ 'country_style' => $slot->country_style,
+ 'type' => $type,
+ };
- $data->{'country'} = $slot->region;
- $data->{'country_style'} = $slot->country_style;
-
-
#warn "Preview template: ".Dumper($data);
$template->param( 'data_selfpromo' => [ $data ] );
