diff --git a/wiki-tile.pl b/wiki-tile.pl index a07c86f..55940b8 100644 --- a/wiki-tile.pl +++ b/wiki-tile.pl @@ -186,6 +186,7 @@ foreach my $page (values %{$location_query_results->{query}{pages}}) next if $page->{title} =~ /^Category:/; my $parsed_template = MWTemplate::Parse($page->{revisions}[0]{'*'}, $location_template_name); my $location = $grid->make_region($page->{title}); + $location->{defaults}{colour} = $parsed_template->{named_params}{colour}; my $location_with_context; if($regiondir) @@ -202,7 +203,7 @@ foreach my $page (values %{$location_query_results->{query}{pages}}) ); $location_with_context = $region_grids{$location->{name}}->make_region($location->{name}); - $location_with_context->{defaults}{colour} = $location->{defaults}{colour} = $parsed_template->{named_params}{colour}; + $location_with_context->{defaults}{colour} = $location->{defaults}{colour}; } # The below regex is a whitespace forgiving version of /^(-?\d+),(-?\d+)/, an int pair