We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34473
    • 2 Posts
    Hi I’m newbie to this and have hit a bit of a brick wall,

    Its a pretty simple setup, product and project pages. I have a menu containers setup for products, with different categories.

    When I click the products page I want all of the products listed. When I click down on the menu I want just the category products listed. This has somewhat worked.

    I have a template for product lists called: Product List

    The TV ProductImage is image input text output

    [[$GlobalTop]]
    <!-- Begin content -->
        <div id="content" class="container_12 clearfix">
    [[$ProductList]]
    </div>
    <!-- End Project Description Main -->
    </div>
    <!-- End content -->
    [[$GlobalBottom]]


    This makes a call to the chunk ProductList which uses getResources

          <div class="grid_12">[[$FeatureModule]]</div>
          <!-- Begin Project Description -->
    [[!getResources?
    &parents=`[[*id]]` 
    &tpl=`ProductListItems`
    &showHidden=`1`
    &hideContainers=`1`  
    &limit=`100`  
    &includeTVs=`1`
    &includeContent=`1`   
    &depth=`1`  
    &sortdir=`ASC`
    ]]  
        
        </div>


    And the ProdcutListItems chuck calls the products
    <!-- Begin Project Name Module-->  
    <div id="module" class="grid_3">
    <h6><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h6>
    <div class="clearfix">
          <div class="grid_3 alpha omega">
             <a href="[[~[[+id]]]]" title="[[+pagetitle]]">     
    
    <img src="[[++assets_url]]products/[[+tv.ProductImage:phpthumbof=`w=220&h=220`]]" />
         
    
    <a href="[[~[[+id]]]]"></a>
    
             </a>
    </div>  
    </div>
    </div>
    <!-- End Project Name Module-->
    


    Now everything seems to work fine, except the phpthumbof doesn’t do what it’s supposed to. Reszie the image, the image displays but doesn’t resize. Its driving me nuts any advice?
      • 18463
      • 121 Posts
      Martijn van Turnhout Reply #2, 15 years, 3 months ago
      Try adding "width" and "height" attributes to the <img> tag itself.
        • 34473
        • 2 Posts
        Hi and Thanks, tried this with &zc=1 added. It only Works when you keep the proportions of the image, 220x120 but stretches when you make 220 doesn’t do zoomed crop.

        <img src="[[++assets_url]]products/[[+tv.ProductImage]]" width="220" />
        Works on its own, wanted to make the images square though