<div class="product-list">
    <h3>Country name or category</h3>
    <div class="product-list__inner">
        <div class="product-list__product-wrapper">
            <div class="product-list__product">
                <div class="product-list__image">
                    <h4>Dysport®</h4>
                    <div>
                    </div>
                </div>
                <div class="product-list__details-container">
                    <div class="product-list__info-wrapper">
                        <div class="product-list__description">Clostridium Botulinum toxin type A Haemagglutinin complex</div>
                        <div class="product-list__description">Powder for solution for injection</div>
                        <div class="product-list__links ">

                            <a href="#1" class="cta cta--link">
  <span class="cta__label">Watch instructional video
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="product-list__product-wrapper">
            <div class="product-list__product">
                <div class="product-list__image">
                    <h4>Decapeptyl®</h4>
                    <div>
                    </div>
                </div>
                <div class="product-list__details-container">
                    <div class="product-list__info-wrapper">
                        <div class="product-list__description">Triptorelin (I.N.N).</div>
                        <div class="product-list__description">Powder and solvent for prolonged release suspension for injection</div>
                        <div class="product-list__links ">

                            <a href="#3" class="cta cta--link">
  <span class="cta__label">Visit Decapeptyl site
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                            <a href="#4" class="cta cta--link">
  <span class="cta__label">Go to Min Medecine
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                        </div>
                    </div>
                    <div class="product-list__info-wrapper">
                        <div class="product-list__description">3mg</div>
                        <div class="product-list__links  ie-flex-fix ">

                            <a href="#3" class="cta cta--link">
  <span class="cta__label">Download patient leaflet
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                            <a href="#4" class="cta cta--link">
  <span class="cta__label">Download characteristics
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                        </div>
                    </div>
                    <div class="product-list__info-wrapper">
                        <div class="product-list__description">11mg</div>
                        <div class="product-list__links  ie-flex-fix ">

                            <a href="#3" class="cta cta--link">
  <span class="cta__label">Visit Decapeptyl site
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                            <a href="#4" class="cta cta--link">
  <span class="cta__label">Go to Min Medecine
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                        </div>
                    </div>
                    <div class="product-list__info-wrapper">
                        <div class="product-list__description">22mg</div>
                        <div class="product-list__links  ie-flex-fix ">

                            <a href="#3" class="cta cta--link">
  <span class="cta__label">Visit Decapeptyl site
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                            <a href="#4" class="cta cta--link">
  <span class="cta__label">Go to Min Medecine
      <svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M14.54 7.63l-1.5 1.13.67 2.21H5.18v2h8.53l-.67 2.2 1.5 1.13 5.32-3.5v-1.67l-5.32-3.5z"/>
      </svg>
  </span>
</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
  • Content:
    <?php
    $products = array(
        'key' => 'products_list', //<---- this is needed so that it shows on the Add Block
        'label' => 'Products List', //<---- this is needed so that it shows on the Add Block
        'title' => 'Products List',
        'name' => 'product-list', // <---- This line defines the Twig file you're using
        'type' => 'group',
        'sub_fields' => array(
        	array (
    	      'key' => 'product_list_section_label',
    	      'label' => 'Section Label',
    	      'name' => 'blocklabel',
    	      'type' => 'text',
    	      'instructions' => __('This label appears in in-page navigation and within the content of some blocks, overriding the title.', 'ipsen-master'),
    	    ),
            array(
    			'key' => 'field_5bd70fc93a2b7',
    			'label' => 'Country name or Category',
    			'name' => 'title',
    			'type' => 'text',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array(
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'default_value' => '',
    			'placeholder' => '',
    			'prepend' => '',
    			'append' => '',
    			'maxlength' => '',
    		),
    		array(
    			'key' => 'field_5bd70ff243efe',
    			'label' => 'Products',
    			'name' => 'products',
    			'type' => 'repeater',
    			'instructions' => '',
    			'required' => 0,
    			'conditional_logic' => 0,
    			'wrapper' => array(
    				'width' => '',
    				'class' => '',
    				'id' => '',
    			),
    			'collapsed' => '',
    			'min' => 0,
    			'max' => 0,
    			'layout' => 'row',
    			'button_label' => 'Add Product',
    			'sub_fields' => array(
    				array(
    					'key' => 'field_5bd7100343eff',
    					'label' => 'Product name',
    					'name' => 'name',
    					'type' => 'text',
    					'instructions' => '',
    					'required' => 1,
    					'conditional_logic' => 0,
    					'wrapper' => array(
    						'width' => '',
    						'class' => '',
    						'id' => '',
    					),
    					'default_value' => '',
    					'placeholder' => '',
    					'prepend' => '',
    					'append' => '',
    					'maxlength' => '',
    				),
    				array(
    					'key' => 'field_5bd710ca43f01',
    					'label' => 'Product Image',
    					'name' => 'image',
    					'type' => 'image',
    					'instructions' => '',
    					'required' => 0,
    					'conditional_logic' => 0,
    					'wrapper' => array(
    						'width' => '',
    						'class' => '',
    						'id' => '',
    					),
    					'return_format' => 'url',
    					'preview_size' => 'thumbnail',
    					'library' => 'all',
    					'min_width' => '',
    					'min_height' => '',
    					'min_size' => '',
    					'max_width' => '',
    					'max_height' => '',
    					'max_size' => '',
    					'mime_types' => '',
    				),
    				array(
    					'key' => 'field_5bd7138f43f08',
    					'label' => 'Product Variants',
    					'name' => 'variants',
    					'type' => 'repeater',
    					'instructions' => '',
    					'required' => 1,
    					'conditional_logic' => array(
    						array(
    							array(
    								'field' => 'field_5bd7135343f07',
    								'operator' => '==',
    								'value' => '1',
    							),
    						),
    					),
    					'wrapper' => array(
    						'width' => '',
    						'class' => '',
    						'id' => '',
    					),
    					'collapsed' => '',
    					'min' => 0,
    					'max' => 0,
    					'layout' => 'row',
    					'button_label' => 'Add variant',
    					'sub_fields' => array(
    						array(
    							'key' => 'field_5bd713db43f09',
    							'label' => 'Main Active Drug',
    							'name' => 'ingredient',
    							'type' => 'text',
    							'instructions' => '',
    							'required' => 0,
    							'conditional_logic' => 0,
    							'wrapper' => array(
    								'width' => '',
    								'class' => '',
    								'id' => '',
    							),
    							'default_value' => '',
    							'placeholder' => '',
    							'prepend' => '',
    							'append' => '',
    							'maxlength' => '',
    						),
    						array(
    							'key' => 'field_5bd714dfe2492',
    							'label' => 'Description',
    							'name' => 'description',
    							'type' => 'textarea',
    							'instructions' => '',
    							'required' => 0,
    							'conditional_logic' => 0,
    							'wrapper' => array(
    								'width' => '',
    								'class' => '',
    								'id' => '',
    							),
    							'default_value' => '',
    							'placeholder' => '',
    							'maxlength' => 400,
    							'rows' => 4,
    							'new_lines' => '',
    						),
    						array(
    							'key' => 'field_5bd7152ee2493',
    							'label' => 'Links',
    							'name' => 'links',
    							'type' => 'repeater',
    							'instructions' => '',
    							'required' => 0,
    							'conditional_logic' => 0,
    							'wrapper' => array(
    								'width' => '',
    								'class' => '',
    								'id' => '',
    							),
    							'collapsed' => '',
    							'min' => 0,
    							'max' => 0,
    							'layout' => 'rows',
    							'button_label' => 'Add Link',
    							'sub_fields' => array(
    								array(
    									'key' => 'field_5bd71541e2494',
    									'label' => 'Label',
    									'name' => 'label',
    									'type' => 'text',
    									'instructions' => '',
    									'required' => 1,
    									'conditional_logic' => 0,
    									'wrapper' => array(
    										'width' => '',
    										'class' => '',
    										'id' => '',
    									),
    									'default_value' => '',
    									'placeholder' => '',
    									'prepend' => '',
    									'append' => '',
    									'maxlength' => '',
    								),
    								array(
    									'key' => 'field_5bd71558e2495',
    									'label' => 'Link',
    									'name' => 'url',
    									'type' => 'link',
    									'instructions' => '',
    									'required' => 1,
    									'conditional_logic' => 0,
    									'wrapper' => array(
    										'width' => '',
    										'class' => '',
    										'id' => '',
    									),
    									'return_format' => 'url',
    								),
    							),
    						),
    						array(
    							'key' => 'field_5be4487a505a3',
    							'label' => 'Files',
    							'name' => 'files',
    							'type' => 'repeater',
    							'instructions' => 'Video or PDF download',
    							'required' => 0,
    							'conditional_logic' => 0,
    							'wrapper' => array(
    								'width' => '',
    								'class' => '',
    								'id' => '',
    							),
    							'collapsed' => '',
    							'min' => 0,
    							'max' => 0,
    							'layout' => 'row',
    							'button_label' => 'Add File',
    							'sub_fields' => array(
    								array(
    									'key' => 'field_5be448ea44a5a',
    									'label' => 'File label',
    									'name' => 'label',
    									'type' => 'text',
    									'instructions' => '',
    									'required' => 1,
    									'conditional_logic' => 0,
    									'wrapper' => array(
    										'width' => '',
    										'class' => '',
    										'id' => '',
    									),
    									'default_value' => '',
    									'placeholder' => '',
    									'prepend' => '',
    									'append' => '',
    									'maxlength' => '',
    								),
    								array(
    									'key' => 'field_5be4490d44a5b',
    									'label' => 'file url',
    									'name' => 'url',
    									'type' => 'file',
    									'instructions' => '',
    									'required' => 1,
    									'conditional_logic' => 0,
    									'wrapper' => array(
    										'width' => '',
    										'class' => '',
    										'id' => '',
    									),
    									'return_format' => 'array',
    									'library' => 'all',
    									'min_size' => '',
    									'max_size' => '',
    									'mime_types' => '',
    								),
    								array(
    									'key' => 'field_5bd71564e2496',
    									'label' => 'Type',
    									'name' => 'type',
    									'type' => 'select',
    									'instructions' => '',
    									'required' => 0,
    									'conditional_logic' => 0,
    									'wrapper' => array(
    										'width' => '',
    										'class' => '',
    										'id' => '',
    									),
    									'choices' => array(
    										'video' => 'Video',
    										'download' => 'Download',
    									),
    									'default_value' => array(
    									),
    									'allow_null' => 0,
    									'multiple' => 0,
    									'ui' => 0,
    									'return_format' => 'value',
    									'ajax' => 0,
    									'placeholder' => '',
    								),
    							),
    						),
    					),
    				),
    			),
    		),
    	),
    );
    
    array_push($_SESSION["blocks"], $products); //<---- this is needed so that it shows on the Add Block
    
  • URL: /components/raw/products-list/products-list.php
  • Filesystem Path: src/components/cms-blocks/products-list/products-list.php
  • Size: 7.8 KB