summaryrefslogtreecommitdiff
path: root/.library/IkiWiki/Plugin/field.pm
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2010-09-13 09:20:03 +0200
committerThomas Schwinge <thomas@schwinge.name>2010-09-13 09:20:03 +0200
commit7621d5ef5b43eff237fc6bad0fe03c89be5ea2eb (patch)
tree1800daad0dca9b9762289ef1a651716bbe6932d1 /.library/IkiWiki/Plugin/field.pm
parentab4ce0b483bc4ebd6abd03be7cd2f942ff2ffc26 (diff)
.library/IkiWiki/Plugin/field.pm (field_set_template_values): Don't redefine if the field already has a value.
Diffstat (limited to '.library/IkiWiki/Plugin/field.pm')
-rw-r--r--.library/IkiWiki/Plugin/field.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/.library/IkiWiki/Plugin/field.pm b/.library/IkiWiki/Plugin/field.pm
index e53474e9..77247ad4 100644
--- a/.library/IkiWiki/Plugin/field.pm
+++ b/.library/IkiWiki/Plugin/field.pm
@@ -356,6 +356,9 @@ sub field_set_template_values ($$;@) {
my @parameter_names = $template->param();
foreach my $field (@parameter_names)
{
+ # Don't redefine if the field already has a value.
+ next if ($template->param($field));
+
my $type = $template->query(name => $field);
if ($type eq 'LOOP' and $field =~ /_LOOP$/i)
{