<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>how insert variable into expression?</title>
    <link>http://forums.shopify.com/categories/2/posts/19702</link>
    <language>en-us</language>
    <description>Feed for discussion topic how insert variable into expression?</description>
    <item>
      <title>how insert variable into expression?</title>
      <author>Kai</author>
      <pubDate>Fri, 16 May 2008 12:41:57 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/19702</link>
      <guid>http://forums.shopify.com/categories/2/posts/19702</guid>
      <description>&lt;p&gt;I have defined a variable and want to insert it into an expression. I don&amp;#8217;t know how to do this.&lt;/p&gt;


	&lt;p&gt;// defining the variable &amp;#8220;recommendation&amp;#8221;&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
{% case product.type %}
  {% when 'Poster' %}
   {% assign recommendation = 'notposter' %}
  {% when 'Toys' %}
   {% assign recommendation = 'nottoys' %}
  {% else %}
{% endcase %}
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;// trying to insert the variable &amp;#8220;recommendation&amp;#8221; into an expression&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
{% tablerow product in collections.recommendation.products cols:3  %}
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;Thanks for help! &amp;#8211; Kai&lt;/p&gt;</description>
    </item>
    <item>
      <title>Christina commented</title>
      <author>Christina</author>
      <pubDate>Fri, 16 May 2008 21:07:29 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/19702#comment-19715</link>
      <guid>http://forums.shopify.com/categories/2/posts/19702#comment-19715</guid>
      <description>&lt;pre&gt;&lt;code&gt;{% tablerow product in collections[recommendation].products cols:3  %}
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;i usually do it like this and it works:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;{% tablerow product in collections.[recommendation].products cols:3  %}
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


	&lt;p&gt;but apparently the first expression is the proper syntax.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kai commented</title>
      <author>Kai</author>
      <pubDate>Fri, 16 May 2008 21:42:05 +0000</pubDate>
      <link>http://forums.shopify.com/categories/2/posts/19702#comment-19717</link>
      <guid>http://forums.shopify.com/categories/2/posts/19702#comment-19717</guid>
      <description>&lt;p&gt;Thanks a so much Christina! It works perfectly!!! :)&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
