Commit 6e695feb by Van

comment slugKey to test

parent 3f66d80c
......@@ -121,14 +121,14 @@ class ContentTypeFile
if(!empty($this->options['locales'])) {
foreach ($this->options['locales'] as $locale) {
$dataKey = strtolower($locale).'data';
$slugKey = strtolower($locale).'slug';
/*$slugKey = strtolower($locale).'slug';*/
$fields[$dataKey] = [
'type' => 'hidden'
];
$fields[$slugKey] = [
/*$fields[$slugKey] = [
'type' => 'hidden',
//'index' => true
];
];*/
}
}
return $fields;
......@@ -173,4 +173,4 @@ class ContentTypeFile
return $this->options['field_mapping'][$key]['label'];
}
}
\ No newline at end of file
}
......@@ -110,19 +110,19 @@ class Data
if (!empty($this->options['locales'])) {
foreach ($this->options['locales'] as $locale) {
$dataKey = strtolower($locale) . 'data';
$slugKey = strtolower($locale) . 'slug';
/*$slugKey = strtolower($locale) . 'slug';*/
if ($locale == $this->options['default_locale']) {
$data[$dataKey] = json_encode([]);
$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);
/*$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
} else {
$dataLocale = $this->getDataForLocales($locale, $data['syndicobjectid']);
if(!empty($dataLocale)) {
$data[$dataKey] = json_encode($dataLocale);
$data[$slugKey] = $dataLocale['slug'];
/*$data[$slugKey] = $dataLocale['slug'];*/
} else {
$data[$dataKey] = json_encode([]);
$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);
/* $data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
}
}
......@@ -146,7 +146,7 @@ class Data
$data[$key] = $v;
}
$data['title'] = $data['syndicobjectname'];
$data['slug'] = Slugify::create()->slugify($locale. '-' .$data['syndicobjectname'].'-'.$data['syndicobjectid']);
/*$data['slug'] = Slugify::create()->slugify($locale. '-' .$data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
return $data;
}
......@@ -155,4 +155,4 @@ class Data
return [];
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment