From dbb1a86ca377e551063cc04c5189fad4aa9148c0 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 15 Dec 2018 20:39:01 +0200 Subject: - Admin Panel / Layout / Custom Product Name now changes webpage title. Thanks to xet7 ! Related #1196 --- client/lib/utils.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'client/lib/utils.js') diff --git a/client/lib/utils.js b/client/lib/utils.js index 525cfb83..d46d8076 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -145,6 +145,26 @@ Utils = { }); }, + manageCustomUI(){ + Meteor.call('getCustomUI', (err, data) => { + if (err && err.error[0] === 'var-not-exist'){ + Session.set('customUI', false); // siteId || address server not defined + } + if (!err){ + Utils.setCustomUI(data); + } + }); + }, + + setCustomUI(data){ + const currentBoard = Boards.findOne(Session.get('currentBoard')); + if (currentBoard) { + DocHead.setTitle(`${currentBoard.title } - ${ data.productName}`); + } else { + DocHead.setTitle(`${data.productName}`); + } + }, + setMatomo(data){ window._paq = window._paq || []; window._paq.push(['setDoNotTrack', data.doNotTrack]); -- cgit v1.2.3-1-g7c22