Hi.
I’m trying to call a item inside a field into another field from Twig template, because I want to filter with expresions “If … Endif” for show or not a content. My blueprint file is this:
'@extends':
type: default
context: blueprints://pages
form:
fields:
tabs:
type: tabs
active: 1
fields:
bootstrap-blog:
type: tab
title: BOOTSTRAP_BLOG.ADMIN.MODULAR.INTERES
fields:
header.cards:
type: list
style: vertical
label: BOOTSTRAP_BLOG.ADMIN.ITEM.INTERES
help: BOOTSTRAP_BLOG.ADMIN.ITEM.INTERES_HELP
collapsed: true
fields:
.icon:
type: pagemediaselect
label: BOOTSTRAP_BLOG.ADMIN.INTERES_ICON
.ruta:
type: text
label: BOOTSTRAP_BLOG.ADMIN.INTERES_LINK
help: BOOTSTRAP_BLOG.ADMIN.INTERES_LINK_HELP
.text:
type: text
label: BOOTSTRAP_BLOG.ADMIN.INTERES_TEXT
.description:
type: text
label: BOOTSTRAP_BLOG.ADMIN.INTERES_DESCRIPTION
.url_video:
type: link
label: BOOTSTRAP_BLOG.ADMIN.VIDEOS_INTERES_URL
.url_text_video:
type: text
label: BOOTSTRAP_BLOG.ADMIN.VIDEOS_INTERES_URL_TEXT
.description_video:
type: text
label: BOOTSTRAP_BLOG.ADMIN.VIDEOS_INTERES_DESCRIPTION
And the code fragment where I want to call that field is this:
{% for card in page.header.cards %}
<p class="card-text"><img src="{{page.media[card.icon].url}}"><strong>
<a href="{{ card.ruta }}" class="text-primary" target="_blank"> {{card.text}}</a></strong><br>{{card.description}}</p>
{% if page.header.cards.url_video %}
<div class="col-md-8 col-sm-12 col-12">
<div class="embed-responsive embed-responsive-16by9">
<iframe src="{{card.url_video}}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
{% if page.header.cards.description_video %}
<p class="card-text"><strong>{{card.description_video}} <a href="{{card.url_video}}" class="text-primary" target="_blank">{{card.url_text_video}}</a>) </strong></p>
{% endif %}
{% endif %}
{% endfor %}
At the moment I could not get to call that item from the twig template. The item is url_video.
I hope you can help me. Thank you