--- layout: page ---
{% assign collections = site.collections | where: "label", page.collection %} {% for collection in collections %} {% assign docs = collection.docs | where: "menu-father", page.menu-name %} {% for doc in docs %} {% assign url-size = doc.url | size | minus: 2 %} {% assign i18n-id = doc.url | slice: 1,url-size | replace: '/', '-' | remove_first: collection.label | remove_first: '-' %} {% assign i18n-title = site.data.i18n.catalog[collection.label][site.lang][i18n-id].title %} {% if doc.i18n[site.lang].description %} {% assign i18n-description = doc.i18n[site.lang].description %} {% else %} {% assign i18n-description = site.data.i18n.catalog[collection.label][site.lang][i18n-id].desc %} {% endif %}
{% if i18n-title %}{{ i18n-title }}{% else %}{{ doc.title }}{% endif %}
{{ doc.brand }} {{ doc.commercial }}
{% if i18n-description %}{{ i18n-description }}{% else %}{{ doc.description }}{% endif %}
{% if doc.price %}{{ doc.price | prepend: '$ ' }}{% endif %}{% assign doc-price-size = doc.price | downcase | split: '.' | last | size %}{% if doc-price-size == 1 %}{{ "0" }}{% endif %}{% if doc.currency %}{{ doc.currency | prepend: ' ' }}{% endif %}
{% endfor %} {% endfor %}