block->file->activeFileId = $this->block->activeFileId; // Hidden fields. $fields = array('name', 'type', 'activeFileId'); foreach ($fields as $field) : // Don't output until it has a value // It better for traffic, client side // should take care of this. if (!$fieldValue = $this->block->file->$field) { continue; } ?>