not launching vue on commerce pages
This commit is contained in:
@ -24,7 +24,7 @@ import { mapState } from 'vuex'
|
||||
// require('theme/assets/styles/main.scss');
|
||||
import 'theme/assets/styles/main.scss'
|
||||
|
||||
(function(Drupal, drupalSettings) {
|
||||
(function(Drupal, drupalSettings, drupalDecoupled) {
|
||||
|
||||
var MaterioTheme = function(){
|
||||
|
||||
@ -33,6 +33,7 @@ import 'theme/assets/styles/main.scss'
|
||||
, _v_main_content;
|
||||
var _is_front = drupalSettings.path.isFront;
|
||||
|
||||
|
||||
console.log('drupalSettings', drupalSettings);
|
||||
|
||||
// ___ _ _
|
||||
@ -44,14 +45,22 @@ import 'theme/assets/styles/main.scss'
|
||||
initVues()
|
||||
}
|
||||
|
||||
function checkNoVuePages(){
|
||||
return drupalDecoupled.sys_path != '/cart'
|
||||
&& drupalDecoupled.sys_path.indexOf('checkout') != 1;
|
||||
}
|
||||
|
||||
function initVues(){
|
||||
initVRouter();
|
||||
initVSiteBrandingBlock()
|
||||
initVPagetitleBlock()
|
||||
initVUserBlock()
|
||||
initVHeaderMenu()
|
||||
initVMainContent()
|
||||
initVSearchBlock()
|
||||
// only launch views if we are not in commerce pages
|
||||
if(checkNoVuePages()){
|
||||
initVRouter();
|
||||
initVSiteBrandingBlock()
|
||||
initVPagetitleBlock()
|
||||
initVUserBlock()
|
||||
initVHeaderMenu()
|
||||
initVMainContent()
|
||||
initVSearchBlock()
|
||||
}
|
||||
}
|
||||
|
||||
function initVRouter(){
|
||||
@ -252,4 +261,4 @@ import 'theme/assets/styles/main.scss'
|
||||
|
||||
var materiotheme = new MaterioTheme();
|
||||
|
||||
})(Drupal, drupalSettings);
|
||||
})(Drupal, drupalSettings, drupalDecoupled);
|
||||
|
Reference in New Issue
Block a user