18 require_once SQ_CORE_PACKAGE_PATH.
'/designs/design_area/design_area.inc';
43 parent::__construct($assetid);
59 echo
'<',
'?php'.
"\n";
60 $field_name = $this->
attr(
'metadata_field');
61 if (empty($field_name)) {
64 $contextid = $GLOBALS[\'SQ_SYSTEM\']->getContextId();
65 $metadata_default_name = \'metadata.php\';
66 $metadata_basename = ($contextid === 0) ? \'metadata.php\' : \'metadata.\'.$contextid.\'.php\';
67 if (file_exists($ASSET->data_path.\'/\'.$metadata_basename)) {
68 require($ASSET->data_path.\'/\'.$metadata_basename);
69 } else if (file_exists($ASSET->data_path.\'/\'.$metadata_default_name)) {
70 require($ASSET->data_path.\'/\'.$metadata_default_name);
76 $METADATA_MANAGER = $GLOBALS[\'SQ_SYSTEM\']->getMetadataManager();
77 $metadata_field_value = $METADATA_MANAGER->getMetadataFieldValues($ASSET->id, Array('.var_export($field_name, TRUE).
'));
78 echo array_get_index($metadata_field_value, '.var_export($field_name, TRUE).
', \'\');