Categories > TinyButStrong general >

blocks issue

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Unni
Date: 2013-03-08
Time: 11:04

blocks issue

Hello,

I am trying to make a list of products with multiple sub templates/htmls
there are 3 types of products- each of  has its own template in the listing of products..
producttype 1 = template 1
producttype 2 = template 2
producttype 3 = template 3

i am using an array here and list the templates in the main page as block
$tmpl_PRODUCT_SEARCH_RESULTB=array ("template 1","template 2","template 3");
$TBS->MergeBlock('blockfiles',$tmpl_PRODUCT_SEARCH_RESULTB); -- IN PHP
[blockfiles.val;block=span;file=[val]] -- IN TEMPLATE

now i am trying to make another array with the product for listing
$RecCnt1 =$TBS->MergeBlock('listpro', $product_display_array);

in the inner snippets (template 1,template 2,template 3) i have used the block variables as folows

<div class="copy">
                                                    <h2><a href="[onshow.countryfolder][onshow.slurp_product_url;htmlconv=no;protect=no]">[listpro.Pre_slu_part_no;block=span;when [listpro.producttype]=21]</a><span class="support_des">Provides</span></h2>
                                                    <p class="restricted_list">for <strong>[listpro.Pre_slu_ca_part_cov]</strong> devices at [listpro.Pre_slu_descrip].</p>
                                                </div>

& [onshow.slurp_product_url;htmlconv=no;protect=no] this place holder read data from database... but this is not converted to value.. it displayed as placeholder itself ...how can i solve this? please help me...

Thanks

Unni
By: Skrol29
Date: 2013-03-09
Time: 03:29

Re: blocks issue

Hi Unni,

What a strange block definition for "listpro", it seems inconsistent.

You say [onshow.slurp_product_url] is not convert to value. What do you have instead ?
By: Unni
Date: 2013-03-09
Time: 05:03

Re: blocks issue

Hi Skrol29,

I have 3 htmls(snippets)files and a main html  file.

and there are 3  types of products....

they are  related as folows

producttype 1 = template 1
producttype 2 = template 2
producttype 3 = template 3

what i need to emboss these 3 snippets in to the main htmls conditionally ( if there is any products (under product type 1) then only template 1 is embossed and so on)

need to list the products come under producttype 1 on the template 1,products come under producttype 2 on the template 2
i read the product details  from the DB and make an array at php level, then use this array in TBS block

this is the task i need to accomplish.. Thanks