Hey is there any way to insert a table in collapsible content? I have a Dawn theme. For example, I have this information in a metafield and need it to be a table.
HI @elektrolt , Where do you want to add collapsible table on your website? also please share your website link so I can check your website.
Best
Rohail Ali
do you add content in table in product admin content
Hi @elektrolt By default there is no way you can turn this data into the table.
Does your every product has a unique value for this or do multiple products have the same data for this filed?
Hey, every product will have unique values
how many total products are there?
@Ahsan_ANC There will be around 100 products
it’s a tricky one, we will need to add 100 tables to the main-product.liquid file and they will be shown based on the product title.
I have another plane. is your data will be 2 columns and fixed number of rows?
@Ahsan_ANC I am thinking about just making those tables as images and add them as a metafield, but it will take a lot of time to make individual table.. There will be 2 collumns in all tables, but I will need a various number of rows. For example: for product infomation I will need 7 rows, for product measurments 5 rows.
I will need some logic, Can you wait for a day I will create a solution tomorrow? currently, a lot of community users are online to get help.
Sure, no problem, thank you very much! @Ahsan_ANC
…
Hi @elektrolt please share the main-product.liquid file code so i can update it
{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}
@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}
{%- assign first_3d_model = product.media | where: “media_type”, “model” | first -%}
{%- if first_3d_model -%}
{{ ‘component-product-model.css’ | asset_url | stylesheet_tag }}
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when ‘@app’ -%}
{% render block %}
{%- when ‘text’ -%}
{{- block.settings.text -}}
{%- when 'title' -%}{{ product.title | escape }}
{{ product.title | escape }}
{% render 'icon-accordion', icon: block.settings.icon %}
{{ block.settings.heading | default: block.settings.page.title }}
{% render 'icon-caret' %}
{{ block.settings.heading | default: block.settings.page.title }}
{% render 'icon-share' %} {{ block.settings.share_label | escape }}
{%- form ‘product’, product, id: product_form_id, class: ‘form’, novalidate: ‘novalidate’, data-type: ‘add-to-cart-form’ -%}
{{ ‘component-pickup-availability.css’ | asset_url | stylesheet_tag }}
{%- assign pick_up_availabilities = product.selected_or_first_available_variant.store_availabilities | where: ‘pick_up_enabled’, true -%}
<pickup-availability class=“product__pickup-availabilities no-js-hidden quick-add-hidden”
{% if product.selected_or_first_available_variant.available and pick_up_availabilities.size > 0 %} available{% endif %}
data-root-url=“{{ routes.root_url }}”
data-variant-id=“{{ product.selected_or_first_available_variant.id }}”
data-has-only-default-variant=“{{ product.has_only_default_variant }}”
{{ 'products.product.pickup_availability.unavailable' | t }}
{{ 'products.product.pickup_availability.refresh' | t }}{%- when ‘rating’ -%}
{%- if product.metafields.reviews.rating.value != blank -%}
{% liquid
assign rating_decimal = 0
assign decimal = product.metafields.reviews.rating.value.rating | modulo: 1
if decimal >= 0.3 and decimal <= 0.7
assign rating_decimal = 0.5
elsif decimal > 0.7
assign rating_decimal = 1
endif
%}
{{ product.metafields.reviews.rating.value }} / {{ product.metafields.reviews.rating.value.scale_max }}
({{ product.metafields.reviews.rating_count }}) {{ product.metafields.reviews.rating_count }} {{ "accessibility.total_reviews" | t }}
{%- endif -%} {%- endcase -%} {%- endfor -%} {{ 'products.product.view_full_details' | t }} {% render 'icon-arrow' %}{%- for media in product.media -%}
{%- liquid
if section.settings.hide_variants and variant_images contains media.src
assign variant_image = true
else
assign variant_image = false
endif
unless media.id == product.selected_or_first_available_variant.featured_media.id
render ‘product-media’, media: media, loop: section.settings.enable_video_looping, variant_image: variant_image
endunless
-%}
{%- endfor -%}
{% assign popups = section.blocks | where: “type”, “popup” %}
{%- for block in popups -%}
<modal-dialog id=“PopupModal-{{ block.id }}” class=“product-popup-modal” {{ block.shopify_attributes }}>
{{ block.settings.page.title }}
{{ block.settings.page.content }}{%- if product.media.size > 0 -%}
{%- endif -%}
{%- if first_3d_model -%}
{%- endif -%}
{%- liquid
if product.selected_or_first_available_variant.featured_media
assign seo_media = product.selected_or_first_available_variant.featured_media
else
assign seo_media = product.featured_media
endif
-%}
