templates/Recipe/recipes.html.twig line 1
{% extends "layout/layout.html.twig" %}
{% block content %}
{% set locale = app.request.locale %}
{% if locale == 'en_GB' %}
{% set locale = 'en' %}
{% endif %}
<span class = "pagetype d-none" >Main Recipe Page</span>
<section class="recipe-top">
<!--Start Banner Recipe-->
<div class="banner-recipe">
<div class="rec-hm-cont recipe-edited-container">
<h2 class="gtm-contentval">{{ "recipebannertext"|trans }}</h2>
<h1 class="gtm-contentval">{{ "recipehome"|trans }}</h1>
<form method ="get" action="/{{locale}}/{{ "recipes_search"|trans }}">
<div class="search-box">
<input type="text" name="q" placeholder="{{ "searchplaceholder"|trans }}">
<!-- <span><i class="fa fa-filter" aria-hidden="true"></i></span> -->
<button class="search-btn" type="submit">
<i class="fa fa-search"></i>
</button>
</div>
</form>
<div class="adv-filter" style ="display: block !important;">
<button class="btn btn-secondary" data-toggle="modal" data-target="#filterModal">
<i class="fa fa-filter"></i>
{{ "advancebtn"|trans }}
</button>
</div>
<div class="suggestion-box">
{% for tag in tags %}
{# <!-- href="/<?php echo $weblink; ?>/searchbytag/<= $tag->getTag() ?>/" --> #}
<a href="/{{locale}}/{{ "searchbytag"|trans }}/{{tag.url}}" class="btn-secondary" >{{tag.tag}}</a>
{% endfor %}
</div>
</div>{{ pimcore_image("RecipehomebannerImg") }}</div>
<!--End Banner Recipe-->
<div class="d-none d-md-block row custom-slider fill-dots top-feature-slider">
{% for key , recipe in recipes %}
{% if key < 4 %}
<div class="col-xl-3 slide " data-aos="fade-up">
<div class="slide-box R-slide-wrap">
<figure class="similar-img">
{% if recipe.featured_image is defined %}
<a href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{recipe.url}}"><img src="{{recipe.featured_image}}" alt="{{recipe.name}} Recipe" class="img-fluid"></a>
{% endif %}
</figure>
<a class="remove-anchor-style1" href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{recipe.url}}"><h3 class="similar-title">{{recipe.name}}</h3></a>
{% set totalrating = 0 %}
{% set totalreviews = 0 %}
{% for i in 0..recipe|length -1 %}
{% for reviews in recipe_reviews %}
{% if reviews.recipe_id.id == recipe.id %}
{% set totalrating = totalrating + reviews.rating %}
{% set totalreviews = totalreviews + 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% if totalreviews > 0 %}
{% set rating = (totalrating / totalreviews)|round %}
{% else %}
{% set rating = 0 %}
{% endif %}
<!--Start Rating Star-->
<div class="rating-holder">
<fieldset class="ratings rating-sm">
{% if rating == '5' %}
<input type="radio" value="5" checked>
{% else %}
<input type="radio" value="5" >
{% endif %}
<label class="full" for="1rviewar5" title="5 stars"></label>
{% if rating == '4' %}
<input type="radio" value="4" checked>
{% else %}
<input type="radio" value="4" >
{% endif %}
<label class="full" for="1reviwstar4" title=" 4 stars"></label>
{% if rating == '3' %}
<input type="radio" value="3" checked>
{% else %}
<input type="radio" value="3" >
{% endif %}
<label class="full" for="1reviewsar3" title="3 stars"></label>
{% if rating == '2' %}
<input type="radio" value="2" checked>
{% else %}
<input type="radio" value="2" >
{% endif %}
<label class="full" for="1reviestar2" title="2 stars"></label>
{% if rating == '1' %}
<input type="radio" value="1" checked>
{% else %}
<input type="radio" value="1">
{% endif %}
<label class="full" for="1reviewar1" title="1 star"></label>
</fieldset>
</div>
<!--End Rating Star-->
<div class="serving-info">
<ul class="list-unstyled">
<li class="time">{{recipe.time}} {{"mins"|trans }}</li>
{% if recipe.getServing() == '1' %}
<li class="serve">{{ recipe.getServing() }}
{{ recipe.getServing2() ? '- ' ~ recipe.getServing2() : '' }}
{{ 'Serving'|trans }}</li>
{% else %}
<li class="serve">{{ recipe.getServing() }}
{{ recipe.getServing2() ? '- ' ~ recipe.getServing2() : '' }}
{{ 'Servings'|trans }}</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<!-- mobile top-feature-slider -->
<div class="d-block d-lg-none d-md-none d-m row custom-slider fill-dots top-feature-slider">
{% for key , recipe in recipes %}
{% if key < 4 %}
<div class="col-xl-3 slide" data-aos="fade-up">
<div class="slide-box R-slide-wrap">
<figure class="similar-img">
{% if recipe.featured_image is defined %}
<a href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{recipe.url}}"><img src="{{recipe.featured_image}}" alt="{{recipe.name}} Recipe" class="img-fluid"></a>
{% endif %}
</figure>
<a class="remove-anchor-style1" href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{recipe.url}}"><h3 class="similar-title">{{recipe.name}}</h3></a>
{% set totalrating = 0 %}
{% set totalreviews = 0 %}
{% for i in 0..recipe|length -1 %}
{% for reviews in recipe_reviews %}
{% if reviews.recipe_id.id == recipe.id %}
{% set totalrating = totalrating + reviews.rating %}
{% set totalreviews = totalreviews + 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% if totalreviews > 0 %}
{% set rating = (totalrating / totalreviews)|round %}
{% else %}
{% set rating = 0 %}
{% endif %}
<!--Start Rating Star-->
<div class="rating-holder">
<fieldset class="ratings rating-sm">
{% if rating == '5' %}
<input type="radio" value="5" checked>
{% else %}
<input type="radio" value="5" >
{% endif %}
<label class="full" for="1rviewar5" title="5 stars"></label>
{% if rating == '4' %}
<input type="radio" value="4" checked>
{% else %}
<input type="radio" value="4" >
{% endif %}
<label class="full" for="1reviwstar4" title=" 4 stars"></label>
{% if rating == '3' %}
<input type="radio" value="3" checked>
{% else %}
<input type="radio" value="3" >
{% endif %}
<label class="full" for="1reviewsar3" title="3 stars"></label>
{% if rating == '2' %}
<input type="radio" value="2" checked>
{% else %}
<input type="radio" value="2" >
{% endif %}
<label class="full" for="1reviestar2" title="2 stars"></label>
{% if rating == '1' %}
<input type="radio" value="1" checked>
{% else %}
<input type="radio" value="1">
{% endif %}
<label class="full" for="1reviewar1" title="1 star"></label>
</fieldset>
</div>
<!--End Rating Star-->
<div class="serving-info">
<ul class="list-unstyled">
<li class="time">{{recipe.time}} {{"mins"|trans }}</li>
{% if recipe.getServing() == '1' %}
<li class="serve">{{ recipe.getServing() }}
{{ recipe.getServing2() ? '- ' ~ recipe.getServing2() : '' }}
{{ 'Serving'|trans }}</li>
{% else %}
<li class="serve">{{ recipe.getServing() }}
{{ recipe.getServing2() ? '- ' ~ recipe.getServing2() : '' }}
{{ 'Servings'|trans }}</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<!-- End mobile top-feature-slider -->
</section>
<!--Start Recipe of the Day Section-->
<!--End Recipe of the Day Section-->
<!--Start Featured Recipes-->
<section id="section06" class="home-section recipe-top similar-recipes featured-recipes">
<div class="container-xl custom-container-xl">
<div class="section-heading">
<h2 class="sub-xl-heading gtm-contentval">{{"FeaturedRecipes"|trans }}</h2>
</div>
<div class="filter-recipe">
<!-- <h4><?= $this->translate("Filterrecipesby"); ?></h4> -->
<div class="suggestion-box">
{# <?php $arr = array('values');
foreach($this->tags as $tag){
foreach ($this->featuredrecipe as $key => $frecipe) {
for($i=0; $i<count($frecipe->getTags()); $i++){
if($frecipe->getTags()[$i]->getTag() == $tag->getTag() ){
if (in_array($tag->getTag(), $arr)){ } else { array_push($arr,$tag->getTag()); ?>
<!-- href="/<?php echo $weblink; ?>/searchbytag/featured/<= $tag->getTag() ?>" -->
<!-- <a class="btn-secondary fftag" data-tag="<?= $tag->getTag() ?>" href="/<?php echo $weblink; ?>/searchbytag/<?= $tag->getUrl() ?>/" data-aos="fade-up" data-aos-duration="400"><?= $tag->getTag() ?></a> -->
<?php } } } } }?> #}
</div>
<div class="adv-filter d-none">
<a href="/{{locale}}/recipes" data-aos="zoom-in-up">
<button class="btn btn-secondary" data-aos="fade-up" data-aos-duration="500">
<i class="fa fa-search"></i>
{{"SearchRecipes"|trans }}
</button></a>
</div>
</div>
<!--Start Slider-->
<div class="row custom-slider fill-dots featured-recipe-lg">
{% for key , frecipe in featuredrecipe %}
{% if key < 8 %}
<div class="col-xl-3 slide" data-aos="zoom-in-up">
<div class="slide-box p-slide-wrap">
<figure class="similar-img">
<a href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{frecipe.url}}" ><img src="{{frecipe.featured_image}}" alt="{{frecipe.name}} Recipe" class="img-fluid"></a>
</figure>
<a class="remove-anchor-style1" href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{frecipe.url}}" ><h3 class="similar-title">{{frecipe.name}}</h3></a>
{% set totalrating = 0 %}
{% set totalreviews = 0 %}
{% for i in 0..frecipe|length -1 %}
{% for reviews in recipe_reviews %}
{% if reviews.recipe_id.id == frecipe.id %}
{% set totalrating = totalrating + reviews.rating %}
{% set totalreviews = totalreviews + 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% if totalreviews > 0 %}
{% set rating = (totalrating / totalreviews)|round %}
{% else %}
{% set rating = 0 %}
{% endif %}
<!--Start Rating Star-->
<div class="rating-holder">
<fieldset class="ratings rating-sm">
{% if rating == '5' %}
<input type="radio" value="5" checked>
{% else %}
<input type="radio" value="5" >
{% endif %}
<label class="full" for="1rviewar5" title="5 stars"></label>
{% if rating == '4' %}
<input type="radio" value="4" checked>
{% else %}
<input type="radio" value="4" >
{% endif %}
<label class="full" for="1reviwstar4" title=" 4 stars"></label>
{% if rating == '3' %}
<input type="radio" value="3" checked>
{% else %}
<input type="radio" value="3" >
{% endif %}
<label class="full" for="1reviewsar3" title="3 stars"></label>
{% if rating == '2' %}
<input type="radio" value="2" checked>
{% else %}
<input type="radio" value="2" >
{% endif %}
<label class="full" for="1reviestar2" title="2 stars"></label>
{% if rating == '1' %}
<input type="radio" value="1" checked>
{% else %}
<input type="radio" value="1">
{% endif %}
<label class="full" for="1reviewar1" title="1 star"></label>
</fieldset>
</div>
<!--End Rating Star-->
<div class="serving-info">
<ul class="list-unstyled">
<li class="time">{{frecipe.time}} {{"mins"|trans }}</li>
{% if frecipe.getServing() == '1' %}
<li class="serve">{{ frecipe.getServing() }}
{{ frecipe.getServing2() ? '- ' ~ frecipe.getServing2() : '' }}
{{ 'Serving'|trans }}</li>
{% else %}
<li class="serve">{{ frecipe.getServing() }}
{{ frecipe.getServing2() ? '- ' ~ frecipe.getServing2() : '' }}
{{ 'Servings'|trans }}</li>
{% endif %}
</ul>
</div>
<p>{{frecipe.description|striptags}}</p>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class="row custom-slider similar-slider fill-dots featured-recipe-sm ">
{% for key , frecipe in featuredrecipe %}
{% if key < 8 %}
<div class="col-xl-3 slide" data-aos="zoom-in-up">
<div class="slide-box p-slide-wrap">
<figure class="similar-img">
<a href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{frecipe.url}}" ><img src="{{frecipe.featured_image}}" alt="{{frecipe.name}} Recipe" class="img-fluid"></a>
</figure>
<a class="remove-anchor-style1" href="/{{locale}}/{{ "all-recipes-link"|trans }}/{{frecipe.url}}" ><h3 class="similar-title">{{frecipe.name}}</h3></a>
{% set totalrating = 0 %}
{% set totalreviews = 0 %}
{% for i in 0..frecipe|length -1 %}
{% for reviews in recipe_reviews %}
{% if reviews.recipe_id.id == frecipe.id %}
{% set totalrating = totalrating + reviews.rating %}
{% set totalreviews = totalreviews + 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% if totalreviews > 0 %}
{% set rating = (totalrating / totalreviews)|round %}
{% else %}
{% set rating = 0 %}
{% endif %}
<div class="rating-holder">
<fieldset class="ratings rating-sm">
{% if rating == '5' %}
<input type="radio" value="5" checked>
{% else %}
<input type="radio" value="5" >
{% endif %}
<label class="full" for="1rviewar5" title="5 stars"></label>
{% if rating == '4' %}
<input type="radio" value="4" checked>
{% else %}
<input type="radio" value="4" >
{% endif %}
<label class="full" for="1reviwstar4" title=" 4 stars"></label>
{% if rating == '3' %}
<input type="radio" value="3" checked>
{% else %}
<input type="radio" value="3" >
{% endif %}
<label class="full" for="1reviewsar3" title="3 stars"></label>
{% if rating == '2' %}
<input type="radio" value="2" checked>
{% else %}
<input type="radio" value="2" >
{% endif %}
<label class="full" for="1reviestar2" title="2 stars"></label>
{% if rating == '1' %}
<input type="radio" value="1" checked>
{% else %}
<input type="radio" value="1">
{% endif %}
<label class="full" for="1reviewar1" title="1 star"></label>
</fieldset>
</div>
<div class="serving-info">
<ul class="list-unstyled">
<li class="time">{{frecipe.time}} {{"mins"|trans }}</li>
{% if frecipe.getServing() == '1' %}
<li class="serve">{{ frecipe.getServing() }}
{{ frecipe.getServing2() ? '- ' ~ frecipe.getServing2() : '' }}
{{ 'Serving'|trans }}</li>
{% else %}
<li class="serve">{{ frecipe.getServing() }}
{{ frecipe.getServing2() ? '- ' ~ frecipe.getServing2() : '' }}
{{ 'Servings'|trans }}</li>
{% endif %}
</ul>
</div>
<p>{{frecipe.description|striptags}}</p>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<!--End Slider-->
<div class="btn-holder view-recieps-btn ">
<a href="/{{locale}}/{{ "all-recipes"|trans }}" class="btn btn-primary ico-btn" data-aos="zoom-in-up">
<i class="icon-dish"></i>
<span>{{ "ViewallRecipes"|trans }}</span>
</a>
</div>
</div>
</section>
<!--End Featured Recipes-->
<!--Start Chef Special-->
<!--End Chef Special-->
<!--Start World of Karak Section-->
<section id="section02" class="home-section karak-section last-section">
<div class="karak-section-holder">
<div class="section-heading">
<h2 class="sub-xl-heading">{{"KarakServingtheoriginaltastesince1955"|trans }}</h2>
</div>
<div class="karak-slider-holder">
<div class="container custom-container">
<div class="row">
<div class="col-xl-9">
<h3 class="main-xl-heading">{{"EnjoyTheRich"|trans }}</h3>
</div>
<!-- <div class="karak-mobile-image">
<img src="/static/assets/images/karakproducts.png" alt="">
</div> -->
<div class="col-xl-9 karak-slider-box">
<div class="custom-slider fill-slider karak-slider">
{% set count = 1 %}
{% for key , product in products %}
{% set regions = product.regions %} <!-- assign regins to valible -->
{% set show = false %}
{% if regions %}
{% for key , region in regions %}
{% if region in groupids %}
{% set show = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if show %}
{% if count <= 4 %}
<div class="slide" data-aos="zoom-in-up">
<div class="karak-box">
<div class="row">
<div class="col-md-5 col-xl-5 karak-img">
{% if product.attributes()[0] is defined %}
<a href="/{{locale}}/{{"products"|trans }}/{{product.attributes()[0].url}}"><img class="img-fluid" alt="{{product.name}}" src="{{product.attributes()[0].images[0].path ~ product.attributes()[0].images[0].filename}}"
xoriginal="{{product.attributes()[0].images[0].path ~ product.attributes()[0].images[0].filename}}" /></a>
{% endif %}
</div>
<div class="col-md-7 col-xl-7 slide-product-info">
{% if product.attributes()[0] is defined %}
<a class="remove-anchor-style1 " href="/{{locale}}/{{"products"|trans }}{{product.attributes()[0].url}}"><h5>{{product.name}}</h5></a>
{% endif %}
<ul class="list-unstyled con-list">
<!-- <php for($i=0;$i<count($product->getSizes()); $i++){ ?>
<li><= $product->getSizes()[$i]['size']->getData() ?></li>
<!- <li>160ml</li>
<li>385ml</li> -->
<!-- <php }?> -->
{% for i , productAttr in product.attributes %}
{% if i < 3 %}
<!-- <li><= $product->getAttributes()[$i]->getSize() ?></li> -->
<li class="{{ i == 0 ? 'variantsbold' : '' }}"><a class="remove-anchor-style1 " href="/{{locale}}/{{"products"|trans }}/{{product.attributes()[0].url}}">{{productAttr.size}}</a></li>
{% endif %}
{% endfor %}
{% if product.attributes %}
{% set regionslinks = product.attributes[0].buttonlinks %}
{% set rlink = [] %}
{% for key ,link in regionslinks %}
{% if link['country'].data == country %}
{% set rlink = link %}
{% endif %}
{% endfor %}
{% if not rlink %}
{% for key ,link in regionslinks %}
{% if link['country'].data == 'AE' %}
{% set rlink = link %}
{% endif %}
{% endfor %}
{% endif %}
{% if not rlink %}
{% set rlink = {
'lulu': { 'data': product.lulu },
'unioncool': { 'data': product.unioncool },
'amazon': { 'data': product.amazon },
'carrefour': { 'data': product.carrefour },
'c4': { 'data': '' },
'noon': { 'data': '' },
'danube': { 'data':'' },
'sultancenter': { 'data': '' },
'tawseel': { 'data': ''},
} %}
{% endif %}
{% endif %}
</ul>
<div class="link-holder">
<button class="btn btn-primary ico-btn productbuynow " data-lulu="{{ (rlink['lulu']) ? rlink['lulu'].data : '' }}"
data-union="{{ (rlink['unioncool']) ? rlink['unioncool'].data : '' }}"
data-amazon="{{ (rlink['amazon']) ? rlink['amazon'].data : '' }}"
data-carrefour="{{ (rlink['carrefour']) ? rlink['carrefour'].data : '' }}"
data-c4="{{ (rlink['c4']) ? rlink['c4'].data : '' }}"
data-noon="{{ (rlink['noon']) ? rlink['noon'].data : '' }}"
data-danube="{{ (rlink['danube']) ? rlink['danube'].data : '' }}"
data-tawseel="{{ (rlink['tawseel']) ? rlink['tawseel'].data : '' }}"
data-sultancenter="{{ (rlink['sultancenter']) ? rlink['sultancenter'].data : '' }}" tabindex="0" data-aos="zoom-in-up">
<i><img src="/static/assets/images/shopping-cart.svg" alt=""></i>
<span>{{"buyNow"|trans }}</span>
</button>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="karaktea-img" data-aos="fade-left" data-aos-delay="400">
{#
<!-- <img id="thisimg_temp" alt="img" src="/static/assets/images/Sequences/Sequence-wc2_3.gif" alt=""> -->
<!-- <?php if($this->getLocale() == 'ar'){ ?>
<img alt="Rainbow_Milk_Pouring_Loop_Final_2000" id="thisimg_temp" class="img-fluid" src="/static/assets/images/Sequences/Sequence-wc2_3-AR.gif" alt="">
<?php }else{ ?>
<img alt="Rainbow_Milk_Pouring_Loop_Final_2000" id="thisimg_temp" class="img-fluid" src="/static/assets/images/Sequences/Sequence-wc2_3.gif" alt="">
<?php } ?> -->
#}
{% if locale == 'ar' %}
<div class="m-image-sections">
<div class="image-container">
<img src="/static/assets/images/design-one.png" alt="Rainbow Condensed Full Milk Cream" />
<img src="/static/assets/images/design-two.png" alt="Rainbow Evaporated Milk - Lite" />
<img src="/static/assets/images/design-three.png" alt="Rainbow Milk - Lite" />
<img src="/static/assets/images/design-four.png" alt="Rainbow Milk - Original" />
<img src="/static/assets/images/design-five.png" alt="Rainbow Evaporated Milk - Original" />
<img src="/static/assets/images/design-six.png" />
</div>
<p class="text-center">في خدمتك منذ عام 1955</p>
</div>
{% else %}
<div class="m-image-sections">
<div class="image-container">
<img src="/static/assets/images/design-one.png" alt="Rainbow Condensed Full Milk Cream" />
<img src="/static/assets/images/design-two.png" alt="Rainbow Evaporated Milk - Lite" />
<img src="/static/assets/images/design-three.png" alt="Rainbow Milk - Lite" />
<img src="/static/assets/images/design-four.png" alt="Rainbow Milk - Original" />
<img src="/static/assets/images/design-five.png" alt="Rainbow Evaporated Milk - Original" />
<img src="/static/assets/images/design-six.png" alt="Rainbow Milk - Original Quality Milk" />
</div>
<p class="text-center">Serving you since 1955</p>
</div>
{% endif %}
</div>
</section>
<!--End World of Karak Section-->
<!--Advance Filter Modal Start-->
<!-- Modal Start -->
{{ render(controller('App\\Controller\\RecipeController::getadvancefiltermodal')) }}
<!-- Modal End -->
<!--Advance Filter Modal End-->
{% if (locale =='ar') %}
{% set weblink = 'ar' %}
{% set topMenu ="/en/recipes" %}
{% set allrecipe = "كل-الوصفات" %}
{% else %}
{% set weblink = 'en' %}
{% set topMenu = "/ar/وصفات" %}
{% set allrecipe = "all-recipes" %}
{% endif %}
<script type="text/javascript">
var _TopMenuLink = "{{topMenu }}"
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ItemList",
"itemListElement": [
{% for key , recipe in recipes %}
{
"@type": "listitem",
"position": "{{ key + 1 }}",
"url": "{{app.request.getSchemeAndHttpHost() ~ '/' ~ locale ~ '/' ~ allrecipe ~ '/' ~ recipe.url}}"
}{% if key < recipe|length -1 %},{% endif %}
{% endfor %}
]
}
</script>
{% endblock %}