Commit 6e695feb by Van

comment slugKey to test

parent 3f66d80c
...@@ -121,14 +121,14 @@ class ContentTypeFile ...@@ -121,14 +121,14 @@ class ContentTypeFile
if(!empty($this->options['locales'])) { if(!empty($this->options['locales'])) {
foreach ($this->options['locales'] as $locale) { foreach ($this->options['locales'] as $locale) {
$dataKey = strtolower($locale).'data'; $dataKey = strtolower($locale).'data';
$slugKey = strtolower($locale).'slug'; /*$slugKey = strtolower($locale).'slug';*/
$fields[$dataKey] = [ $fields[$dataKey] = [
'type' => 'hidden' 'type' => 'hidden'
]; ];
$fields[$slugKey] = [ /*$fields[$slugKey] = [
'type' => 'hidden', 'type' => 'hidden',
//'index' => true //'index' => true
]; ];*/
} }
} }
return $fields; return $fields;
......
...@@ -110,19 +110,19 @@ class Data ...@@ -110,19 +110,19 @@ class Data
if (!empty($this->options['locales'])) { if (!empty($this->options['locales'])) {
foreach ($this->options['locales'] as $locale) { foreach ($this->options['locales'] as $locale) {
$dataKey = strtolower($locale) . 'data'; $dataKey = strtolower($locale) . 'data';
$slugKey = strtolower($locale) . 'slug'; /*$slugKey = strtolower($locale) . 'slug';*/
if ($locale == $this->options['default_locale']) { if ($locale == $this->options['default_locale']) {
$data[$dataKey] = json_encode([]); $data[$dataKey] = json_encode([]);
$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']); /*$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
} else { } else {
$dataLocale = $this->getDataForLocales($locale, $data['syndicobjectid']); $dataLocale = $this->getDataForLocales($locale, $data['syndicobjectid']);
if(!empty($dataLocale)) { if(!empty($dataLocale)) {
$data[$dataKey] = json_encode($dataLocale); $data[$dataKey] = json_encode($dataLocale);
$data[$slugKey] = $dataLocale['slug']; /*$data[$slugKey] = $dataLocale['slug'];*/
} else { } else {
$data[$dataKey] = json_encode([]); $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 ...@@ -146,7 +146,7 @@ class Data
$data[$key] = $v; $data[$key] = $v;
} }
$data['title'] = $data['syndicobjectname']; $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; return $data;
} }
......
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