converted blabla listing into vuex store to avoid reloading the whole list
This commit is contained in:
@@ -70,17 +70,22 @@ export default {
|
||||
methods: {
|
||||
getArticle(){
|
||||
console.log(this.$route);
|
||||
// get the article uuid
|
||||
if(this.$route.query.uuid){
|
||||
// we come from internal link with vuejs
|
||||
// directly record uuid
|
||||
this.uuid = this.$route.query.uuid
|
||||
this.loadArticle()
|
||||
}else if(drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article'){
|
||||
// get the uuid from drupalDeclouped
|
||||
// provided by materio_decoupled.module
|
||||
// console.log(drupalDecoupled);
|
||||
// we landed in an internal page
|
||||
// get the uuid from drupalDeclouped, provided by materio_decoupled.module
|
||||
this.uuid = drupalDecoupled.entity_uuid
|
||||
}
|
||||
|
||||
if(this.uuid){
|
||||
this.loadArticle()
|
||||
}else{
|
||||
// if for any reason we dont have the uuid
|
||||
// redirect to home
|
||||
this.$route.replace('home')
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user