fixed thematiques display
This commit is contained in:
parent
72ea56e313
commit
6485e3e27b
|
@ -15,6 +15,7 @@ dependencies:
|
||||||
- field.storage.node.field_famille
|
- field.storage.node.field_famille
|
||||||
- field.storage.node.field_manufacturer
|
- field.storage.node.field_manufacturer
|
||||||
- field.storage.node.field_reference
|
- field.storage.node.field_reference
|
||||||
|
- field.storage.node.field_short_description
|
||||||
- field.storage.node.field_tags
|
- field.storage.node.field_tags
|
||||||
- field.storage.taxonomy_term.field_synonyms
|
- field.storage.taxonomy_term.field_synonyms
|
||||||
- field.storage.node.field_thesaurus
|
- field.storage.node.field_thesaurus
|
||||||
|
@ -104,6 +105,14 @@ field_settings:
|
||||||
dependencies:
|
dependencies:
|
||||||
config:
|
config:
|
||||||
- field.storage.node.field_reference
|
- field.storage.node.field_reference
|
||||||
|
field_short_description:
|
||||||
|
label: 'Short description'
|
||||||
|
datasource_id: 'entity:node'
|
||||||
|
property_path: field_short_description
|
||||||
|
type: string
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- field.storage.node.field_short_description
|
||||||
name:
|
name:
|
||||||
label: 'Manufacturer » Terme de taxonomie » Nom'
|
label: 'Manufacturer » Terme de taxonomie » Nom'
|
||||||
datasource_id: 'entity:node'
|
datasource_id: 'entity:node'
|
||||||
|
@ -234,6 +243,14 @@ field_settings:
|
||||||
dependencies:
|
dependencies:
|
||||||
module:
|
module:
|
||||||
- node
|
- node
|
||||||
|
type:
|
||||||
|
label: 'Type de contenu'
|
||||||
|
datasource_id: 'entity:node'
|
||||||
|
property_path: type
|
||||||
|
type: string
|
||||||
|
dependencies:
|
||||||
|
module:
|
||||||
|
- node
|
||||||
uid:
|
uid:
|
||||||
label: uid
|
label: uid
|
||||||
datasource_id: 'entity:node'
|
datasource_id: 'entity:node'
|
||||||
|
@ -304,6 +321,7 @@ processor_settings:
|
||||||
- country_code_1
|
- country_code_1
|
||||||
- field_famille
|
- field_famille
|
||||||
- field_reference
|
- field_reference
|
||||||
|
- field_short_description
|
||||||
- name
|
- name
|
||||||
- name_1
|
- name_1
|
||||||
- processed
|
- processed
|
||||||
|
@ -312,6 +330,7 @@ processor_settings:
|
||||||
- thesaurus_name
|
- thesaurus_name
|
||||||
- thesaurus_synonyms
|
- thesaurus_synonyms
|
||||||
- title
|
- title
|
||||||
|
- type
|
||||||
- uuid
|
- uuid
|
||||||
title: true
|
title: true
|
||||||
alt: true
|
alt: true
|
||||||
|
|
|
@ -1,19 +1,39 @@
|
||||||
scalar Violation
|
scalar Violation
|
||||||
|
|
||||||
interface NodeInterface {
|
interface NodeInterface {
|
||||||
id: Int!
|
|
||||||
path: String!
|
|
||||||
}
|
|
||||||
|
|
||||||
type Materiau implements NodeInterface {
|
|
||||||
id: Int!
|
id: Int!
|
||||||
uuid: String!
|
uuid: String!
|
||||||
title: String!
|
title: String!
|
||||||
path: String!
|
path: String!
|
||||||
author: String
|
author: String
|
||||||
body: String
|
bundle: String!
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SearchResultInterface {
|
||||||
|
id: Int!
|
||||||
|
uuid: String!
|
||||||
|
title: String!
|
||||||
|
path: String!
|
||||||
|
author: String
|
||||||
|
bundle: String!
|
||||||
|
#
|
||||||
short_description: String
|
short_description: String
|
||||||
|
body: String
|
||||||
linked_materials: [Materiau]
|
linked_materials: [Materiau]
|
||||||
|
}
|
||||||
|
|
||||||
|
type Materiau implements NodeInterface & SearchResultInterface{
|
||||||
|
id: Int!
|
||||||
|
uuid: String!
|
||||||
|
title: String!
|
||||||
|
path: String!
|
||||||
|
author: String
|
||||||
|
bundle: String!
|
||||||
|
#
|
||||||
|
short_description: String
|
||||||
|
body: String
|
||||||
|
linked_materials: [Materiau]
|
||||||
|
#
|
||||||
linked_articles: [Article]
|
linked_articles: [Article]
|
||||||
images: [Image]
|
images: [Image]
|
||||||
videos: [VideoLink]
|
videos: [VideoLink]
|
||||||
|
@ -23,11 +43,28 @@ type Materiau implements NodeInterface {
|
||||||
attachments: [Filefield]
|
attachments: [Filefield]
|
||||||
distributor: [Company]
|
distributor: [Company]
|
||||||
manufacturer: [Company]
|
manufacturer: [Company]
|
||||||
# famille: String
|
|
||||||
# index: Int
|
|
||||||
reference: String
|
reference: String
|
||||||
samples: [Sample]
|
samples: [Sample]
|
||||||
note: Note
|
note: Note
|
||||||
|
# famille: String
|
||||||
|
# index: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
type Thematique implements NodeInterface & SearchResultInterface {
|
||||||
|
id: Int!
|
||||||
|
uuid: String!
|
||||||
|
title: String!
|
||||||
|
path: String!
|
||||||
|
author: String
|
||||||
|
bundle: String!
|
||||||
|
#
|
||||||
|
short_description: String
|
||||||
|
body: String
|
||||||
|
linked_materials: [Materiau]
|
||||||
|
#
|
||||||
|
images: [Image]
|
||||||
|
tags: [Tag]
|
||||||
|
memo: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type Article implements NodeInterface {
|
type Article implements NodeInterface {
|
||||||
|
@ -36,6 +73,8 @@ type Article implements NodeInterface {
|
||||||
title: String!
|
title: String!
|
||||||
path: String!
|
path: String!
|
||||||
author: String
|
author: String
|
||||||
|
bundle: String!
|
||||||
|
#
|
||||||
body: String
|
body: String
|
||||||
linked_materials: [Materiau]
|
linked_materials: [Materiau]
|
||||||
images: [Image]
|
images: [Image]
|
||||||
|
@ -48,37 +87,24 @@ type Article implements NodeInterface {
|
||||||
memo: String
|
memo: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type Thematique implements NodeInterface {
|
|
||||||
id: Int!
|
|
||||||
uuid: String!
|
|
||||||
title: String!
|
|
||||||
path: String!
|
|
||||||
author: String
|
|
||||||
body: String
|
|
||||||
linked_materials: [Materiau]
|
|
||||||
images: [Image]
|
|
||||||
tags: [Tag]
|
|
||||||
memo: String
|
|
||||||
}
|
|
||||||
|
|
||||||
type Note {
|
type Note {
|
||||||
id: Int!
|
id: Int!
|
||||||
contenu: String
|
contenu: String
|
||||||
target: Int
|
target: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type SearchResult {
|
# type SearchResult {
|
||||||
id: Int!
|
# id: Int!
|
||||||
uuid: String!
|
# uuid: String!
|
||||||
title: String!
|
# title: String!
|
||||||
bundle: String!
|
# bundle: String!
|
||||||
path: String!
|
# path: String!
|
||||||
short_description: String
|
# short_description: String
|
||||||
images: [Image]
|
# images: [Image]
|
||||||
visuels: [Image]
|
# visuels: [Image]
|
||||||
reference: String
|
# reference: String
|
||||||
samples: [Sample]
|
# samples: [Sample]
|
||||||
}
|
# }
|
||||||
|
|
||||||
type Product {
|
type Product {
|
||||||
id: Int!
|
id: Int!
|
||||||
|
|
|
@ -11,7 +11,7 @@ extend type Query {
|
||||||
}
|
}
|
||||||
|
|
||||||
extend type Query {
|
extend type Query {
|
||||||
searchresults(ids: [Int], lang: String): [SearchResult]
|
searchresults(ids: [Int], lang: String): [SearchResultInterface]
|
||||||
}
|
}
|
||||||
|
|
||||||
extend type Query {
|
extend type Query {
|
||||||
|
|
|
@ -101,9 +101,17 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
$builder->compose(
|
$builder->compose(
|
||||||
$builder->produce('route_load')
|
$builder->produce('route_load')
|
||||||
->map('path', $builder->fromArgument('path')),
|
->map('path', $builder->fromArgument('path')),
|
||||||
|
$builder->callBack(function($parent, $args){
|
||||||
|
$t="t";
|
||||||
|
return $parent;
|
||||||
|
}),
|
||||||
$builder->produce('route_entity')
|
$builder->produce('route_entity')
|
||||||
->map('url', $builder->fromParent())
|
->map('url', $builder->fromParent())
|
||||||
->map('language', $builder->fromArgument('lang'))
|
->map('language', $builder->fromArgument('lang')),
|
||||||
|
$builder->callBack(function($parent, $args){
|
||||||
|
$t="t";
|
||||||
|
return $parent;
|
||||||
|
})
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +149,12 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
->map('entity', $builder->fromParent())
|
->map('entity', $builder->fromParent())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Materiau', 'bundle',
|
||||||
|
$builder->compose(
|
||||||
|
$builder->produce('entity_bundle')
|
||||||
|
->map('entity', $builder->fromParent())
|
||||||
|
));
|
||||||
|
|
||||||
$registry->addFieldResolver('Materiau', 'path',
|
$registry->addFieldResolver('Materiau', 'path',
|
||||||
$builder->compose(
|
$builder->compose(
|
||||||
$builder->produce('entity_url')
|
$builder->produce('entity_url')
|
||||||
|
@ -319,6 +333,12 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
->map('path', $builder->fromValue('field_contenu.value'))
|
->map('path', $builder->fromValue('field_contenu.value'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Note', 'bundle',
|
||||||
|
$builder->compose(
|
||||||
|
$builder->produce('entity_bundle')
|
||||||
|
->map('entity', $builder->fromParent())
|
||||||
|
));
|
||||||
|
|
||||||
$registry->addFieldResolver('Note', 'target',
|
$registry->addFieldResolver('Note', 'target',
|
||||||
$builder->produce('property_path')
|
$builder->produce('property_path')
|
||||||
->map('type', $builder->fromValue('entity:node'))
|
->map('type', $builder->fromValue('entity:node'))
|
||||||
|
@ -332,6 +352,14 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
// \__ \/ -_) _` | '_/ _| ' \| / -_|_-< || | | _|
|
// \__ \/ -_) _` | '_/ _| ' \| / -_|_-< || | | _|
|
||||||
// |___/\___\__,_|_| \__|_||_|_|_\___/__/\_,_|_|\__|
|
// |___/\___\__,_|_| \__|_||_|_|_\___/__/\_,_|_|\__|
|
||||||
protected function addSearchResult(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
protected function addSearchResult(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
||||||
|
// Tell GraphQL how to resolve types of a common interface.
|
||||||
|
$registry->addTypeResolver('SearchResultInterface', function ($value) {
|
||||||
|
switch ($value->bundle()) {
|
||||||
|
case 'materiau': return 'Materiau';
|
||||||
|
case 'thematique': return 'Thematique';
|
||||||
|
}
|
||||||
|
throw new Error('Could not resolve content type.');
|
||||||
|
});
|
||||||
|
|
||||||
$registry->addFieldResolver('Query', 'searchresults',
|
$registry->addFieldResolver('Query', 'searchresults',
|
||||||
$builder->produce('entity_load_multiple')
|
$builder->produce('entity_load_multiple')
|
||||||
|
@ -339,69 +367,6 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
->map('ids', $builder->fromArgument('ids'))
|
->map('ids', $builder->fromArgument('ids'))
|
||||||
->map('language', $builder->fromArgument('lang'))
|
->map('language', $builder->fromArgument('lang'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'id',
|
|
||||||
$builder->produce('entity_id')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'bundle',
|
|
||||||
$builder->produce('entity_bundle')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'uuid',
|
|
||||||
$builder->produce('entity_uuid')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'path',
|
|
||||||
$builder->compose(
|
|
||||||
$builder->produce('entity_url')
|
|
||||||
->map('entity', $builder->fromParent()),
|
|
||||||
$builder->produce('url_path')
|
|
||||||
->map('url', $builder->fromParent())
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'title',
|
|
||||||
$builder->compose(
|
|
||||||
$builder->produce('entity_label')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
));
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'short_description',
|
|
||||||
$builder->produce('property_path')
|
|
||||||
->map('type', $builder->fromValue('entity:node'))
|
|
||||||
->map('value', $builder->fromParent())
|
|
||||||
->map('path', $builder->fromValue('field_short_description.value'))
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'images',
|
|
||||||
$builder->produce('entity_reference')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
->map('field', $builder->fromValue('field_materiau_images'))
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'visuels',
|
|
||||||
$builder->produce('entity_reference')
|
|
||||||
->map('entity', $builder->fromParent())
|
|
||||||
->map('field', $builder->fromValue('field_visuel'))
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'reference',
|
|
||||||
$builder->produce('property_path')
|
|
||||||
->map('type', $builder->fromValue('entity:node'))
|
|
||||||
->map('value', $builder->fromParent())
|
|
||||||
->map('path', $builder->fromValue('field_reference.value'))
|
|
||||||
);
|
|
||||||
|
|
||||||
$registry->addFieldResolver('SearchResult', 'samples',
|
|
||||||
$builder->produce('property_path')
|
|
||||||
->map('type', $builder->fromValue('entity:node'))
|
|
||||||
->map('value', $builder->fromParent())
|
|
||||||
->map('path', $builder->fromValue('field_samples'))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ___ _
|
// ___ _
|
||||||
|
@ -454,6 +419,13 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Article', 'bundle',
|
||||||
|
$builder->compose(
|
||||||
|
$builder->produce('entity_bundle')
|
||||||
|
->map('entity', $builder->fromParent())
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
$registry->addFieldResolver('Article', 'title',
|
$registry->addFieldResolver('Article', 'title',
|
||||||
$builder->compose(
|
$builder->compose(
|
||||||
$builder->produce('entity_label')
|
$builder->produce('entity_label')
|
||||||
|
@ -575,6 +547,7 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
// |_| |_||_\___|_|_|_\__,_|\__|_\__, |\_,_\___|
|
// |_| |_||_\___|_|_|_\__,_|\__|_\__, |\_,_\___|
|
||||||
// |_|
|
// |_|
|
||||||
protected function addThematique(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
protected function addThematique(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
||||||
|
|
||||||
$registry->addFieldResolver('Query', 'Thematique',
|
$registry->addFieldResolver('Query', 'Thematique',
|
||||||
$builder->produce('entity_load')
|
$builder->produce('entity_load')
|
||||||
->map('type', $builder->fromValue('node'))
|
->map('type', $builder->fromValue('node'))
|
||||||
|
@ -601,6 +574,12 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Thematique', 'bundle',
|
||||||
|
$builder->compose(
|
||||||
|
$builder->produce('entity_bundle')
|
||||||
|
->map('entity', $builder->fromParent())
|
||||||
|
));
|
||||||
|
|
||||||
$registry->addFieldResolver('Thematique', 'title',
|
$registry->addFieldResolver('Thematique', 'title',
|
||||||
$builder->compose(
|
$builder->compose(
|
||||||
$builder->produce('entity_label')
|
$builder->produce('entity_label')
|
||||||
|
@ -615,6 +594,13 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||||
->map('entity', $builder->fromParent())
|
->map('entity', $builder->fromParent())
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Thematique', 'short_description',
|
||||||
|
$builder->produce('property_path')
|
||||||
|
->map('type', $builder->fromValue('entity:node'))
|
||||||
|
->map('value', $builder->fromParent())
|
||||||
|
->map('path', $builder->fromValue('field_short_description.value'))
|
||||||
|
);
|
||||||
|
|
||||||
$registry->addFieldResolver('Thematique', 'body',
|
$registry->addFieldResolver('Thematique', 'body',
|
||||||
$builder->produce('property_path')
|
$builder->produce('property_path')
|
||||||
->map('type', $builder->fromValue('entity:node'))
|
->map('type', $builder->fromValue('entity:node'))
|
||||||
|
|
|
@ -107,7 +107,7 @@ class Base extends ControllerBase {
|
||||||
private function defaultQuery(){
|
private function defaultQuery(){
|
||||||
$entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
$entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
||||||
$this->query = $entity_storage->getQuery()
|
$this->query = $entity_storage->getQuery()
|
||||||
->condition('type', 'materiau')
|
->condition('type', ['materiau', 'thematique'], 'IN')
|
||||||
->condition('status', '1')
|
->condition('status', '1')
|
||||||
->range($this->offset, $this->limit)
|
->range($this->offset, $this->limit)
|
||||||
->accessCheck(TRUE)
|
->accessCheck(TRUE)
|
||||||
|
@ -116,7 +116,7 @@ class Base extends ControllerBase {
|
||||||
$this->results = $this->query->execute();
|
$this->results = $this->query->execute();
|
||||||
|
|
||||||
$this->count_query = $entity_storage->getQuery()
|
$this->count_query = $entity_storage->getQuery()
|
||||||
->condition('type', 'materiau')
|
->condition('type', ['materiau', 'thematique'], 'IN')
|
||||||
->accessCheck(TRUE)
|
->accessCheck(TRUE)
|
||||||
->condition('status', '1')
|
->condition('status', '1')
|
||||||
->count();
|
->count();
|
||||||
|
@ -191,18 +191,18 @@ class Base extends ControllerBase {
|
||||||
$nids = [];
|
$nids = [];
|
||||||
// Using entityTypeManager
|
// Using entityTypeManager
|
||||||
// Get a node storage object.
|
// Get a node storage object.
|
||||||
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
|
// $node_storage = \Drupal::entityTypeManager()->getStorage('node');
|
||||||
|
|
||||||
foreach ($this->results as $result) {
|
foreach ($this->results as $result) {
|
||||||
$lang = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
// $lang = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
||||||
// Load a single node.
|
// Load a single node.
|
||||||
$node = $node_storage->load($result);
|
// $node = $node_storage->load($result);
|
||||||
// check if has translation
|
// check if has translation
|
||||||
|
|
||||||
if ($node->hasTranslation($lang)) {
|
// i used to filter like bellow because of a graphql probleme
|
||||||
// $uuids[] = $result->getField('uuid')->getValues()[0];
|
// if ($node->hasTranslation($lang)) {
|
||||||
$nids[] = $result;
|
$nids[] = $result;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
// $resp['uuids'] = $uuids;
|
// $resp['uuids'] = $uuids;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,23 +1,18 @@
|
||||||
fragment SearchResultFields on SearchResult {
|
fragment SearchResultFields on SearchResultInterface {
|
||||||
id
|
id
|
||||||
uuid
|
uuid
|
||||||
bundle
|
bundle
|
||||||
|
path
|
||||||
title
|
title
|
||||||
short_description
|
short_description
|
||||||
reference
|
... on Materiau{
|
||||||
path
|
|
||||||
images{
|
images{
|
||||||
url
|
url
|
||||||
alt
|
alt
|
||||||
style_cardmedium_url
|
style_cardmedium_url
|
||||||
style_hd_url
|
style_hd_url
|
||||||
}
|
}
|
||||||
visuels{
|
reference
|
||||||
url
|
|
||||||
alt
|
|
||||||
style_cardmedium_url
|
|
||||||
style_hd_url
|
|
||||||
}
|
|
||||||
samples{
|
samples{
|
||||||
showroom{
|
showroom{
|
||||||
name
|
name
|
||||||
|
@ -25,4 +20,13 @@ fragment SearchResultFields on SearchResult {
|
||||||
}
|
}
|
||||||
location
|
location
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
... on Thematique {
|
||||||
|
images{
|
||||||
|
url
|
||||||
|
alt
|
||||||
|
style_cardmedium_url
|
||||||
|
style_hd_url
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</header>
|
</header>
|
||||||
<section class="images" v-switcher>
|
<section class="images" v-switcher>
|
||||||
<figure
|
<figure
|
||||||
v-for="(img, index) in item.visuels"
|
v-for="(img, index) in item.images"
|
||||||
:key="img.url"
|
:key="img.url"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
</figure>
|
</figure>
|
||||||
</section>
|
</section>
|
||||||
<CoolLightBox
|
<CoolLightBox
|
||||||
:items="item.visuels"
|
:items="item.images"
|
||||||
:index="lightbox_index"
|
:index="lightbox_index"
|
||||||
srcName="style_hd_url"
|
srcName="style_hd_url"
|
||||||
:loop="true"
|
:loop="true"
|
||||||
|
@ -54,7 +54,7 @@ export default {
|
||||||
blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,
|
blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,
|
||||||
// loadingFlag: false,
|
// loadingFlag: false,
|
||||||
lightbox_index: null,
|
lightbox_index: null,
|
||||||
alias: this.item.path.replace(/^.?\/thematique\//g, '')
|
alias: this.item.path.replace(/^.*\/thematique\//g, '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// computed: {
|
// computed: {
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
openThematique (e) {
|
openThematique (e) {
|
||||||
console.log('openThematique', e);
|
console.log('openThematique', e, this.alias);
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name:`thematique`,
|
name:`thematique`,
|
||||||
params: { alias:this.alias }
|
params: { alias:this.alias }
|
||||||
|
|
Loading…
Reference in New Issue