templates/layout/layout.html.twig line 244

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html  lang="{{app.request.locale}}" class="{{app.request.locale}}">
  3. <head>
  4. <meta http-equiv="Content-Security-Policy" script-src='unsafe-inline';>
  5. <!-- <link rel="icon" href="/static/assets/images/Logo/Fav Icon_Rainbow.png" type="image/png" > -->
  6.   <!-- Google Tag Manager -->
  7.   <script type="text/javascript">
  8.   (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  9.   new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  10.   j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  11.   'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  12.   })(window,document,'script','dataLayer','GTM-K3DSRZX');
  13.   </script>
  14.   <!-- End Google Tag Manager -->
  15.     <meta charset="utf-8">
  16.     <!-- <link rel="icon" type="image/png" href="/pimcore/static/img/favicon/favicon-32x32.png" /> -->
  17.     <link rel="icon" href="/static/assets/images/Logo/Fav Icon_Rainbow.png" type="image/png" >
  18.     <link rel="stylesheet" href="/static/assets/css/layout.css">
  19.     {# <?php 
  20.     $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" "http://";
  21.     
  22.     ?>
  23.     
  24.     
  25.     <?php
  26.     if($this->getLocale() == 'ar'){
  27.       $weblink 'ar';
  28.     }else{
  29.       $weblink 'en';
  30.     }
  31.     $url =urldecode(urldecode($this->pimcoreUrl()));
  32.     $baselink htmlspecialchars($url);
  33.     $actula_url $protocol.$_SERVER['HTTP_HOST'].$baselink;
  34.     $canonicalUrl urldecode($this->getRequest()->getpathInfo());
  35.     //p_r($actula_url);
  36.    // p_r($this->getRequest()->getrequestUri());
  37.     //p_r($canonicalUrl);
  38.     //p_r($protocol.$_SERVER['HTTP_HOST'] . $canonicalUrl);
  39.     $canurl $protocol.$_SERVER['HTTP_HOST'] . $canonicalUrl;
  40.     //p_r($canurl);
  41.     
  42.     //p_r($this->pimcoreUrl());
  43.     //p_r($protocol.$_SERVER['HTTP_HOST'].$baselink);
  44.   
  45.     
  46.     ?>
  47.  
  48.   
  49.       <?php //$canonicalUrl = urldecode($this->document->getUrl()); ?> #}
  50.     
  51.     
  52.     <link rel="canonical"  href="{{app.request.uri|striptags}}" />
  53.   
  54.         {# Meta Tiles Starts #}
  55.             {% if not document is defined or not document %}
  56.       {% set document = pimcore_document(1) %}
  57.       {% endif %}
  58.             {% if document is instanceof('\\Pimcore\\Model\\Document\\Link') %}
  59.             {# @var document \Pimcore\Model\Document\Link #}
  60.       {% set document = document.getObject() %}
  61.       {% endif %}
  62.     
  63.       {% if recipedetails is defined %}
  64.         {% do pimcore_head_title().set(recipedetails.metaTitle) %}
  65.       {% elseif productsss is defined %}
  66.           {% do pimcore_head_title().set(productsss.metaTitle) %}
  67.       {% elseif banners is defined %}
  68.           {% if app.request.locale == "ar" %} 
  69.             {% do pimcore_head_title().set("المنتجات") %}
  70.           {% else %}
  71.             {% do pimcore_head_title().set("Products") %}
  72.           {% endif %} 
  73.       {% elseif category[0] is defined %}
  74.         {% do pimcore_head_title().set(category[0].CategoryMetaTitle) %}
  75.       {% elseif document.getTitle() is defined %}
  76.         {% do pimcore_head_title().set(document.getTitle()) %}
  77.       {% endif %}
  78.         {# Meta Tiles End #}
  79.     {# Meta Descriptions Starts #}
  80.             {% if recipedetails is defined %}
  81.               {% do pimcore_head_meta().setDescription(recipedetails.metaDescription) %}
  82.           {% elseif productsss is defined %}
  83.                 {% do pimcore_head_meta().setDescription(productsss.metaDescription) %}
  84.       {% elseif category[0] is defined %}
  85.               {% do pimcore_head_meta().setDescription(category[0].CategoryMetaDesc) %}
  86.           {% elseif document.getDescription() is not empty %}
  87.               {% do pimcore_head_meta().setDescription(document.getDescription()) %}
  88.         
  89.           {% endif %}
  90.         {# Meta Descriptions End #}
  91.         {% if app.request.locale == "ar" %} 
  92.           {% do pimcore_head_title().append("أبو قوس") %}
  93.         {% else %}
  94.           {% do pimcore_head_title().append("Rainbow Milk") %}
  95.         {% endif %} 
  96.         {% do pimcore_head_title().setSeparator(" | ") %}
  97.       {{ pimcore_head_title() }}
  98.       {{ pimcore_head_meta() }}
  99.       {{ pimcore_placeholder('canonical') }}
  100.       
  101.       
  102.     
  103.     <script type="application/ld+json">
  104.             {
  105.               "@context": "https://schema.org",
  106.               "@type": "Organization",
  107.               "address": {
  108.                 "@type": "PostalAddress",
  109.                 "addressLocality": "Paris, France",
  110.                 "postalCode": "F-75002",
  111.                 "streetAddress": "38 avenue de l'Opera"
  112.               },
  113.               "email": "secretariat(at)google.org",
  114.               "name": "Google.org (GOOG)",
  115.               "image": "https://rainbow.centric.ae/_default_upload_bucket/logo_1.png",
  116.               "telephone": "( 33 1) 42 68 53 00"
  117.             }
  118.     </script>
  119.     <script type="application/ld+json">
  120.             {
  121.                 "@context": "https://schema.org",
  122.                 "@type": "WebSite",
  123.                 "url": "http://example.com/",
  124.                 "potentialAction": {
  125.                   "@type": "SearchAction",
  126.                   "target": {
  127.                     "@type": "EntryPoint",
  128.                     "urlTemplate": "http://example.com/recipe-search?q={search_term_string}"},
  129.                     "query-input": "required name=search_term_string"
  130.                 }
  131.             }
  132.     </script>
  133.     <script type="application/ld+json">
  134.             {
  135.               "@context": "https://schema.org",
  136.               "@type": "VideoObject",
  137.               "name": "Introducing the self-driving bicycle in the Netherlands",
  138.               "description": "This spring, Google is introducing the self-driving bicycle in Amsterdam, the world's premier cycling city. The Dutch cycle more than any other nation in the world, almost 900 kilometres per year per person, amounting to over 15 billion kilometres annually. The self-driving bicycle enables safe navigation through the city for Amsterdam residents, and furthers Google's ambition to improve urban mobility with technology. Google Netherlands takes enormous pride in the fact that a Dutch team worked on this innovation that will have great impact in their home country.",
  139.               "thumbnailUrl": [
  140.                 "https://example.com/photos/1x1/photo.jpg",
  141.                 "https://example.com/photos/4x3/photo.jpg",
  142.                 "https://example.com/photos/16x9/photo.jpg"
  143.               ],
  144.               "uploadDate": "2016-03-31T08:00:00+08:00",
  145.               "duration": "PT1M54S",
  146.               "contentUrl": "https://www.example.com/video/123/file.mp4",
  147.               "embedUrl": "https://www.example.com/embed/123"
  148.             }
  149.     </script>
  150.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  151.     <!-- Le styles -->
  152.     {% do pimcore_head_link().appendStylesheet('/static/assets/images/favicon.ico') %}
  153.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/font-awesome.min.css') %}
  154.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/bootstrap.min.css') %}
  155.     {# {% do pimcore_head_link().appendStylesheet('https://cdn.rtlcss.com/bootstrap/v4.5.3/css/bootstrap.min.css') %} #}
  156.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/style.css') %}
  157.     {% do pimcore_head_link().appendStylesheet('/static/css/home.css') %}
  158.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/slick.css') %}
  159.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/main.min.css') %}
  160.     {% do pimcore_head_link().appendStylesheet('/static/assets/css/aos.css') %}
  161.     
  162.     {% if app.request.locale == 'ar' %}
  163.       {% do pimcore_head_link().appendStylesheet('/static/assets/css/style-ar.css', "screen") %}
  164.     {% else %}
  165.       {% do pimcore_head_link().appendStylesheet('/static/assets/css/style.css', "screen") %}
  166.     {% endif %}
  167.     {% if editmode %}
  168.       {% do pimcore_head_link().appendStylesheet('/static/css/editmode.css', "screen") %}
  169.     {% endif %}
  170.     {{ pimcore_head_link() }}
  171.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/app.js')) %}
  172.     
  173.     
  174.     <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  175.     <!--[if lt IE 9]>
  176.     <script src="/static/js/html5shiv.js"></script>
  177.     <script src="/static/js/respond.min.js"></script>
  178.     <![endif]-->
  179. </head>
  180. {% set isPortal = ((isPortal is defined) and isPortal) %}
  181. {% set uri_segments = app.request.pathInfo|split('/') %}
  182. <body class="{{isPortal ? 'portal-page Home ' : '' ~  uri_segments[2] ? uri_segments[2] : 'Home'}}">
  183. <!-- <= $this->translate("RecipeswithEvaporatedMilk") ?> -->
  184. <!-- Google Tag Manager (noscript) -->
  185.   <noscript>
  186.   <iframe class="iframe-d-none-visibility" src="https://www.googletagmanager.com/ns.html?id=GTM-K3DSRZX"
  187.   height="0" width="0"></iframe>
  188.   </noscript>
  189. <!-- End Google Tag Manager (noscript) -->
  190. {% if app.request.locale == "ar" %}
  191.   {{ pimcore_inc("/ar/includes/header") }}
  192.             {% else %}
  193.           {{ pimcore_inc("/en/includes/header") }}
  194.             
  195.             {% endif %}
  196. <div class="wrapper">
  197.     
  198.       {{ block('content') }}
  199.        {% include "includes/sticky-menu.html.twig" %}
  200. </div>
  201.       {% if  app.request.locale == "ar" %} 
  202.               {{ pimcore_inc("/ar/includes/footer") }}
  203.         
  204.             {% else %}
  205.               {{ pimcore_inc("/en/includes/footer") }}
  206.             {% endif %}
  207.     
  208.   
  209.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/jquery-3.5.1.min.js')) %}
  210.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/bootstrap.bundle.min.js')) %}
  211.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/slick.min.js')) %}
  212.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/aos.js')) %}
  213.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/custom.js')) %}
  214.     {% do pimcore_head_script().appendFile(asset('/static/assets/js/app.js')) %}
  215.     {{ pimcore_head_script() }}
  216. <!-- Modal BuyNow Button-->
  217. <div class="modal fade top__13Vh" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  218.   <div class="modal-dialog" role="document">
  219.     <div class="modal-content">
  220.         <div class="colse-btn">
  221.           <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  222.             <i class=""><img src="/static/assets/images/pop-close.svg" class="w-25" alt=""></i>
  223.             <p>{{ 'Close'|trans }}</p>
  224.           </button>
  225.         </div>
  226.         <div class="modal-header"><h5 class="modal-title">{{'Buyourproductsfromthebelowstores'|trans }}</h5></div>
  227.       <div class="modal-body">
  228.         <div class="container">
  229.           <div class="row align-items-center">
  230.               <div class="col-lg-3 col-sm-6 col-6 d-lulu">
  231.                 <div class="m-img">
  232.                   <a href="#" class="lulu" target="_blank"><img src="/static/assets/images/Lulu logo.png" class="img-fluid" alt=""></a>
  233.                 </div>
  234.               </div>
  235.               <div class="col-lg-3 col-sm-6 col-6 d-amazon">
  236.                 <div class="m-img">
  237.                   <a href="#" class="amazon" target="_blank"><img src="/static/assets/images/Amazon_logo.svg" class="img-fluid" alt=""></a>
  238.                 </div>
  239.               </div>
  240.               <div class="col-lg-3 col-sm-6 col-6 d-union">
  241.                 <div class="m-img">
  242.                   <a href="#" class="union" target="_blank"><img src="/static/assets/images/union coop logo.png" class="img-fluid" alt=""></a>
  243.                 </div>
  244.               </div>
  245.               <div class="col-lg-3 col-sm-6 col-6 d-carrefour">
  246.                 <div class="m-img">
  247.                   <a href="#" class="carrefour" target="_blank"><img src="/static/assets/images/carrefour-logo.png" class="img-fluid" alt=""></a>
  248.                 </div>
  249.               </div>
  250.               <div class="col-lg-3 col-sm-6 col-6 d-c4">
  251.                 <div class="m-img">
  252.                   <!-- <a href="#" class="c4" target="_blank"><img src="/static/assets/images/c4-logo.png" class="img-fluid" alt=""></a> -->
  253.                 </div>
  254.               </div>
  255.               <div class="col-lg-3 col-sm-6 col-6 d-noon">
  256.                 <div class="m-img">
  257.                   <a href="#" class="noon" target="_blank"><img src="/static/assets/images/noon-logo.png" class="img-fluid" alt=""></a>
  258.                 </div>
  259.               </div>
  260.               <div class="col-lg-3 col-sm-6 col-6 d-danube">
  261.                 <div class="m-img">
  262.                   <a href="#" class="danube" target="_blank"><img src="/static/assets/images/danube-logo.png" class="img-fluid" alt=""></a>
  263.                 </div>
  264.               </div>
  265.               <div class="col-lg-3 col-sm-6 col-6 d-tawseel">
  266.                 <div class="m-img">
  267.                   <a href="#" class="tawseel" target="_blank"><img src="/static/assets/images/tawseel-logo.png" class="img-fluid" alt=""></a>
  268.                 </div>
  269.               </div>
  270.               <div class="col-lg-3 col-sm-6 col-6 d-sultancenter">
  271.                 <div class="m-img">
  272.                   <a href="#" class="sultancenter" target="_blank"><img src="/static/assets/images/sultancenter-logo.png" class="img-fluid" alt=""></a>
  273.                 </div>
  274.               </div>
  275.               
  276.               <div class="text"><span>{{ 'Linksarenotavailable'|trans }}</span></div>
  277.           </div>
  278.         </div>
  279.       </div>
  280.     </div>
  281.   </div>
  282. </div>
  283. <!-- End Modal -->
  284. <!-- Modal Share Attribute -->
  285. <div class="modal fade top__40Vh" id="myshare" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  286.   <div class="modal-dialog" role="document">
  287.     <div class="modal-content">
  288.           <div class="colse-btn">
  289.             <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  290.             <i class=""><img src="/static/assets/images/pop-close.svg" class="w-25" alt=""></i>
  291.             <p>{{ 'Close'|trans }}</p>
  292.             </button>
  293.           </div>
  294.           <div class="modal-header">
  295.             <h5 class="modal-title">{{'ShareRainbowRecipewithyourFriends'|trans }}</h5>
  296.           </div>
  297.           <div class="modal-body mdl-ss">
  298.             <div class="container">
  299.               <div class="row align-items-center">
  300.                 <div class="col-lg-4 col-sm-4 col-4 sp">
  301.                   <div class="m-img">
  302.                     <a href="https://www.facebook.com/sharer/sharer.php?u= {{ app.request.uri }}" data-fb="https://www.facebook.com/sharer/sharer.php?u= {{app.request.uri}}" class="facebook btnRecipeshare" target="_blank"><i class="fa fa-facebook " aria-hidden="true"></i></a>
  303.                   </div>
  304.                 </div>
  305.                 <div class="col-lg-4 col-sm-4 col-4 sp">
  306.                   <div class="m-img">
  307.                     <a href="https://twitter.com/intent/tweet?url= {{ app.request.uri }} " data-tw="https://twitter.com/intent/tweet?url= {{app.request.uri}} " class="twitter btnRecipeshare" target="_blank"><i class="fa fa-twitter " aria-hidden="true"></i></a>
  308.                   </div>
  309.                 </div>
  310.                 <div class="col-lg-4 col-sm-4 col-4 sp">
  311.                   <div class="m-img">
  312.                     <a href="https://wa.me/?text={{ app.request.uri }}" data-ins="" class="instagram " target="_blank"><i class="fa fa-whatsapp btnRecipeshare" aria-hidden="true"></i></a>
  313.                   </div>
  314.                 </div>
  315.               </div>
  316.             </div>
  317.           </div>
  318.     </div>
  319.   </div>
  320. </div>
  321. <!-- End Modal Attribute -->
  322. {#
  323. <!-- Modal Share-ingredient button -->
  324. <div class="modal fade top__40Vh" id="share-ingredient" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  325.   <div class="modal-dialog" role="document">
  326.     <div class="modal-content">
  327.         <div class="colse-btn">
  328.           <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  329.           <i class="">
  330.               <img src="/static/assets/images/pop-close.svg" class="w-25" alt="">
  331.           </i>
  332.           <p>Close</p>
  333.           </button>
  334.         </div>
  335.         <div class="modal-header"><h5 class="modal-title">{{ 'ShareRainbowRecipewithyourFriends'|trans }}</h5></div>
  336.       <div class="modal-body mdl-ss">
  337.       <div class="container">
  338.       <div class="row align-items-center">
  339.           <div class="col-lg-4 col-sm-4 col-4 sp">
  340.             <div class="m-img">
  341.               <a href="https://www.facebook.com/sharer/sharer.php?u= <?php echo $url ?>" data-fb="https://www.facebook.com/sharer/sharer.php?u= <?php echo $url ?> &message=" class="facebooking" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>
  342.             </div>
  343.           </div>
  344.           <div class="col-lg-4 col-sm-4 col-4 sp">
  345.           <div class="m-img">
  346.               <a href="https://twitter.com/intent/tweet?url= <?php echo $url ?> " data-tw="https://twitter.com/intent/tweet?url= <?php echo $url ?> " class="twittering" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a>
  347.             </div>
  348.           </div>
  349.           <div class="col-lg-4 col-sm-4 col-4 sp">
  350.           <div class="m-img">
  351.               <a href="https://wa.me/?text=<?php echo $url ?>" data-wts="https://wa.me/?text=<?php echo $url ?>" class="whatsapping" target="_blank"><i class="fa fa-whatsapp" aria-hidden="true"></i></a>
  352.             </div>
  353.           </div>
  354.       </div>
  355.   </div>
  356.       </div>
  357.     </div>
  358.   </div>
  359. </div>
  360. <!-- End Modal Attribute -->
  361. #}
  362. <!-- Modal HTML -->
  363.   <div id="subscribe-popup" class="modal fade" tabindex="-1">
  364.     <div class="modal-dialog">
  365.       <div class="modal-content">
  366.         <div class="custom-modal">
  367.           <div class="modal-header">
  368.             <div class="">
  369.               <h3>{{ 'NEWSLETTERSUBSCTRIPTIONFORM'|trans }}</h3>
  370.             </div>
  371.           </div>
  372.         </div>
  373.         <form action="/newsletter" class="newsletter" id="newsletter" method="post">
  374.         <div class="modal-body">
  375.           <div class="row">
  376.             <div class="col-md-6">
  377.               <div class="form-group">
  378.                 <label class="custom-label">{{ 'First Name'|trans }}<spam class="red-alert"> *</spam></label>
  379.                 <input type="text" class="form-control custom-control" required="" name="first_name">
  380.               </div>
  381.             </div>
  382.             <div class="col-md-6">
  383.               <div class="form-group">
  384.                 <label class="custom-label">{{ 'Last Name'|trans }}<spam class="red-alert"> *</spam></label>
  385.                 <input type="text" class="form-control custom-control" required="" name="last_name">
  386.               </div>
  387.             </div>
  388.             <div class="col-md-12">
  389.               <div class="form-group">
  390.                 <label class="custom-label">{{ 'Emailaddress'|trans }}<spam class="red-alert"> *</spam></label>
  391.                 <input type="email" class="form-control custom-control" required="required" name="email">
  392.               </div>
  393.             </div>
  394.           </div>
  395.         </div>
  396.         <div class="custom-modal">
  397.           <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  398.             <span aria-hidden="true">
  399.               <i><img src="/static/assets/images/pop-close.svg" alt=""></i>
  400.               {{ 'Close'|trans }}</span>
  401.           </button>
  402.         </div>
  403.         <div class="modal-footer">
  404.           <button type="submit" class="btn btn-primary"><img src="/static/assets/images/Icon-zocial-email.png" alt="">{{'SUBSCRIBENOW'|trans }}</button>
  405.         </div>
  406.         <div class="alert alert-success alert_display__opacity" id="success-alert"><button class="close" data-dismiss="alert" type="button">x</button> Your email address successfully subscribed.</div>
  407.         <div class="alert alert-danger alert_display__opacity" id="warning-alertt"><button class="close" data-dismiss="alert" type="button">x</button> Some required fields are emplty.</div>
  408.         <div class="alert alert-warning alert_display__opacity" id="failed-alert"><button class="close" data-dismiss="alert" type="button">x</button> This email address has already subscribed.</div>
  409.       </div>
  410.     </div>
  411.  </div>
  412. {% set visitorReg = render(controller('App\\Controller\\RegionController::regionidAction'))%}
  413. <script type="text/javascript">
  414. $(document).ready(function(){
  415.   var webLang = "{{app.request.locale}}";
  416.   var vistReg = "{{visitorReg}}";
  417.   var vistDevice = "{{ pimcore_device()}}";
  418.   var currpageURL = "{{app.request.uri}}";
  419.   currpageURL = decodeURI(currpageURL);
  420.   var pageTitle = $(document).attr('title'); 
  421.   var pageType = pageTitle;
  422.   if(webLang == "ar"){
  423.     pageTitle = (currpageURL.toLowerCase() == "/ar" ? "الصفحة الرئيسية | أبو قوس" : pageTitle);
  424.   }else{
  425.     pageTitle = (currpageURL.toLowerCase() == "/en" ? "Home Page | Rainbow Milk" : pageTitle);
  426.   }
  427.   // 'contentValue': 'What can you do with Rainbow?',
  428.   //     'contentValue': `Whether it's Rainbow's Evaporated Milk, Cream, Thick Cream or Sweetened Condensed Milk, find a recipe ready for you to try. Discover deliciousness with every Rainbow product.`
  429.  var pagetype = $('.pagetype').text();
  430.   window.dataLayer = window.dataLayer || [];
  431.   var data = {
  432.       //'pageURL': protocol +"://"+ baseURL + currpageURL,
  433.       'pageURL': currpageURL,
  434.       'pageBrand': (webLang == "ar" ? "أبو قوس" : "Rainbow Milk"),
  435.       'pageCountry': vistReg,
  436.       'pageLanguage': (webLang == "ar" ? "Arabic" : "English"),
  437.       'pageSource': vistDevice,
  438.       'pageName': pageTitle,
  439.       'pageType': pagetype
  440.   };
  441.   //Only Works With <h> or <p> or <span>
  442.   $('.gtm-contentval').each(function(i, obj) {
  443.       data["contentValue" + (i + 1)] = $(obj).text();
  444.   });
  445.   
  446.   var cpURLArr = currpageURL.split("/");
  447.   if(cpURLArr.length > 3){
  448.     for(i = 3; i < cpURLArr.length; i++ ){
  449.       data["pageCategory" + (i - 2)] = cpURLArr[i];
  450.     }
  451.   }
  452.   console.log("GTM DataLayer ", data); 
  453.   window.dataLayer.push({
  454.       'page': { 'pageinfo': data }
  455.   });
  456. });
  457. </script>
  458. </body>
  459. </html>