File "be015dac4046125b103a1a0d36fbadf0483595ec_0.file.magazine-dettaglio.tmpl.php"

Full Path: /srv/www/www.cadoro.it/src/templates_c/be015dac4046125b103a1a0d36fbadf0483595ec_0.file.magazine-dettaglio.tmpl.php
File size: 14.02 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/* Smarty version 3.1.29, created on 2024-02-21 17:40:23
  from "/srv/www/www.cadoro.it/src/templates/magazine-dettaglio.tmpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_65d627779face7_37855083',
  'file_dependency' => 
  array (
    'be015dac4046125b103a1a0d36fbadf0483595ec' => 
    array (
      0 => '/srv/www/www.cadoro.it/src/templates/magazine-dettaglio.tmpl',
      1 => 1708527642,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:layout-magazine.tmpl' => 1,
    'file:cms-content-fluid.tmpl' => 1,
  ),
),false)) {
function content_65d627779face7_37855083 ($_smarty_tpl) {
$_smarty_tpl->ext->_inheritance->init($_smarty_tpl, true);
?>

<html>
  <head>
    <title><?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, 'title', array (
  0 => 'block_180331576765d627779af404_15463665',
  1 => false,
  3 => 0,
  2 => 0,
));
?>
</title>
    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "head", array (
  0 => 'block_172887432065d627779b3081_13753239',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

  </head>
  <body>
    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "content-right", array (
  0 => 'block_173853666165d627779bcd49_23104316',
  1 => false,
  3 => 0,
  2 => 0,
));
?>


    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "jstail", array (
  0 => 'block_88111386765d627779f7554_84016006',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

  </body>
</html>
<?php $_smarty_tpl->ext->_inheritance->endChild($_smarty_tpl);
$_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:layout-magazine.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false);
}
/* {block 'title'}  file:magazine-dettaglio.tmpl */
function block_180331576765d627779af404_15463665($_smarty_tpl, $_blockParentStack) {
echo (($tmp = @$_smarty_tpl->tpl_vars['article']->value['seo_title'])===null||$tmp==='' ? $_smarty_tpl->tpl_vars['article']->value['title'] : $tmp);
}
/* {/block 'title'} */
/* {block 'head'}  file:magazine-dettaglio.tmpl */
function block_172887432065d627779b3081_13753239($_smarty_tpl, $_blockParentStack) {
?>

    <meta name="og:title" content="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['article']->value['seo_title'])===null||$tmp==='' ? $_smarty_tpl->tpl_vars['article']->value['title'] : $tmp);?>
">
    <meta name="og:image" content="<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['article']->value['image_cover'];?>
">
    <meta name="og:description" content="<?php echo $_smarty_tpl->tpl_vars['article']->value['seo_description'];?>
">
    <meta name="og:url" content="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
">
    <meta name="description" content="<?php echo $_smarty_tpl->tpl_vars['article']->value['seo_description'];?>
">
    <meta name="keywords" content="<?php echo $_smarty_tpl->tpl_vars['article']->value['seo_keywords'];?>
">
    <?php
}
/* {/block 'head'} */
/* {block 'content-right'}  file:magazine-dettaglio.tmpl */
function block_173853666165d627779bcd49_23104316($_smarty_tpl, $_blockParentStack) {
?>

    <div class="row">
      <div class="col-sm-9 mb20">
        <div class="magazine-article magazine-article-<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
">
          <div class="mb20 hidden-screen visible-print">
            <img src="<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/images/logo.png" alt="CADORO">
          </div>

          <?php if ($_smarty_tpl->tpl_vars['article']->value['image_cover']) {?>
          <div class="magazine-article-cover">
            <a href="<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['article']->value['image_cover'];?>
" rel="gallery">
              <img src="<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['article']->value['image_cover'];?>
" alt="<?php echo $_smarty_tpl->tpl_vars['article']->value['title'];?>
" class="img-responsive" style="min-width: 100%;">
              <h1><?php echo $_smarty_tpl->tpl_vars['article']->value['title'];?>
</h1>
            </a>
          </div>
          <?php }?>
          <?php if (_get('favourite')) {?>
            <?php if ($_smarty_tpl->tpl_vars['principal']->value && _get('remove')) {?>
            <div class="alert alert-success mt20 hidden-print">
              Questo contenuto è stato rimosso dalla tua <strong>lista dei preferiti</strong>!
            </div>
            <?php } elseif ($_smarty_tpl->tpl_vars['principal']->value) {?>
            <div class="alert alert-success mt20 hidden-print">
              Questo contenuto è stato aggiunto alla tua <strong>lista dei preferiti</strong>!
            </div>
            <?php } else { ?>
            <div class="alert alert-danger mt20 hidden-print">
              Attenzione, per aggiungere un contenuto alla tua <strong>lista dei preferiti</strong> devi <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/login">accedere o registrarti!</a>
            </div>
            <?php }?>
          <?php }?>

          <?php $_smarty_tpl->tpl_vars["page"] = new Smarty_Variable($_smarty_tpl->tpl_vars['article']->value, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, "page", 0);?>
          <?php if ($_smarty_tpl->tpl_vars['article']->value['date'] && _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug') != 'ricette') {?>
          <div class="mt20">
            <strong><?php echo mb_strtoupper(_ddf($_smarty_tpl->tpl_vars['article']->value['date']));?>
</strong>
          </div>
          <?php }?>

          <?php if (_a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug') == 'ricette') {?>
          <div class="row hidden-print">
            <div class="col-sm-3 col-xs-6 mt25 mb10">
              <?php if ($_smarty_tpl->tpl_vars['principal']->value && $_smarty_tpl->tpl_vars['principal']->value->get_favourite_by_type_and_id('blog-article',$_smarty_tpl->tpl_vars['article']->value['id'])) {?>
              <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
?favourite=1&remove=1" class="add-to-favourite red">
                <i class="fa fa-heart"></i>
                RIMUOVI DA PREFERITI
              </a>
              <?php } else { ?>
              <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
?favourite=1" class="add-to-favourite">
                <i class="fa fa-heart"></i>
                AGGIUNGI AI PREFERITI
              </a>
              <?php }?>
            </div>
            <div class="col-sm-3 col-xs-6 mt25 mb10">
              <a href="" class="add-to-shopping-list">
                <i class="fa fa-plus"></i>
                SALVA IN LISTA DELLA SPESA
              </a>
            </div>
            <div class="col-sm-3 col-xs-6 mt25 mb10">
              <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/profilo/lista-spesa" class="go-to-shopping-list">
                <i class="fa fa-clipboard"></i>
                VAI ALLA LISTA DELLA SPESA
              </a>
            </div>
            <div class="col-sm-3 col-xs-6 mt25 mb10">
              <a href="javascript:window.print()" class="do-print">
                <i class="fa fa-print"></i>
                STAMPA<br>RICETTA
              </a>
            </div>
          </div>
          <?php }?>

          <?php $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:cms-content-fluid.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>


          <hr class="hidden-print">
          <div class="magazine-article-share mt20 hidden-print">
            <div class="row">
              <div class="col-sm-6">
                <span class="title pull-left">
                  <strong>CONDIVIDI</strong>
                </span>
                <?php echo '<script'; ?>
 type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-57d532178271be23"><?php echo '</script'; ?>
>
                <div class="addthis_inline_share_toolbox" style="display: inline-block; margin-left: 15px; margin-top: -5px;"></div>
              </div>
              <?php if (_a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug') != 'ricette') {?>
			  <?php if ($_smarty_tpl->tpl_vars['article']->value['ingredients']) {?>
              <div class="col-sm-3 text-right">
                <a href="" class="add-to-shopping-list">
                  <i class="fa fa-plus"></i>
                  SALVA IN LISTA DELLA SPESA
                </a>
              </div>
              <?php }?>
			  <?php }?>
              <?php if (_a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug') != 'ricette') {?>
              <div class="col-sm-3 <?php if (!$_smarty_tpl->tpl_vars['article']->value['ingredients']) {?>col-sm-offset-3 <?php }?>text-right">
                <?php if ($_smarty_tpl->tpl_vars['principal']->value && $_smarty_tpl->tpl_vars['principal']->value->get_favourite_by_type_and_id('blog-article',$_smarty_tpl->tpl_vars['article']->value['id'])) {?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
?favourite=1&remove=1" class="add-to-favourite red">
                  <i class="fa fa-heart"></i>
                  RIMUOVI DA PREFERITI
                </a>
                <?php } else { ?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['article']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
?favourite=1" class="add-to-favourite">
                  <i class="fa fa-heart"></i>
                  AGGIUNGI AI PREFERITI
                </a>
                <?php }?>
              </div>
              <?php }?>
            </div>
          </div>
        </div>
      </div>
      <?php if ($_smarty_tpl->tpl_vars['related']->value) {?>
      <div class="col-sm-3 hidden-print">
        <div class="magazine-article-related">
          <div class="h4">
            LEGGI ANCHE
          </div>
          <?php
$_from = $_smarty_tpl->tpl_vars['related']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_r_0_saved_item = isset($_smarty_tpl->tpl_vars['r']) ? $_smarty_tpl->tpl_vars['r'] : false;
$_smarty_tpl->tpl_vars['r'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['r']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['r']->value) {
$_smarty_tpl->tpl_vars['r']->_loop = true;
$__foreach_r_0_saved_local_item = $_smarty_tpl->tpl_vars['r'];
?>
            <?php $_smarty_tpl->tpl_vars["c"] = new Smarty_Variable($_smarty_tpl->tpl_vars['r']->value->get_category(), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, "c", 0);?>
            <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/magazine/<?php echo _a($_smarty_tpl->tpl_vars['r']->value->get_category(),'slug');?>
/<?php echo $_smarty_tpl->tpl_vars['r']->value['slug'];?>
-<?php echo $_smarty_tpl->tpl_vars['r']->value['id'];?>
" class="magazine-item magazine-item-<?php echo $_smarty_tpl->tpl_vars['c']->value['slug'];?>
 magazine-item-related mb20"
               style="background-image: url(<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['r']->value['image_list'];?>
);">
              <img src="<?php echo $_smarty_tpl->tpl_vars['cdn_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['c']->value['image_list'];?>
" alt="<?php echo $_smarty_tpl->tpl_vars['c']->value['title'];?>
" class="magazine-item__category">
              <span class="magazine-item__title"><?php echo $_smarty_tpl->tpl_vars['r']->value['title'];?>
</span>
            </a>
          <?php
$_smarty_tpl->tpl_vars['r'] = $__foreach_r_0_saved_local_item;
}
if ($__foreach_r_0_saved_item) {
$_smarty_tpl->tpl_vars['r'] = $__foreach_r_0_saved_item;
}
?>
        </div>
      </div>
      <?php }?>
    </div>
    <?php
}
/* {/block 'content-right'} */
/* {block 'jstail'}  file:magazine-dettaglio.tmpl */
function block_88111386765d627779f7554_84016006($_smarty_tpl, $_blockParentStack) {
?>

    <?php echo '<script'; ?>
>
      $(function () {
        $('.add-to-shopping-list').click(function (e) {
          e.preventDefault();
          $.ajax({
              url: '<?php echo $_smarty_tpl->tpl_vars['base_url']->value;
echo $_smarty_tpl->tpl_vars['request_uri']->value;?>
'
            , method: 'POST'
            , data: {
                action: 'shopping-list'
              }
            , success: function (data, textStatus, jqXHR) {
                if (data && data.status) {
                  bootbox.alert("Gli ingredienti di questa ricetta sono stati aggiunti alla tua lista della spesa!");
                } else {
                  bootbox.alert("Attenzione, per utilizzare questa funzionalità devi <a href='<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/login'>accedere o registrarti</a>!");
                }
              }
          });
        });
      });
    <?php echo '</script'; ?>
>
    <?php
}
/* {/block 'jstail'} */
}