title: Hubspot (Jinja): Adding variables to blog data for output in for loop
body: <p><em>Hubspot is built in jinja and provides a limited and customized jinja library for use by it's developers. no server side access is available and python does not work in it's templates</em> </p>
  
  <p>Hello,</p>
  
  <p>I am wondering if it is possible to add variables to the blog data.</p>
  
  <p>Currently to build out a blog listing page you would set a for loop</p>
  
  <pre><code>`{% for content in contents %}
  
  {% endfor %}`
  </code></pre>
  
  <p>then you would call in variables that call in different parts of the blog posts</p>
  
  <pre><code>{{ content.foo ))
  </code></pre>
  
  <p>These variables are for elements already and always included in a hubspot blog post such as</p>
  
  <p>author
  date
  title
  summary
  absolute link
  etc.</p>
  
  <p>But is it possible to add to these variables. For instance, lets say I add an image module into the blog post template. Is there a way to access this on the listing page?</p>
  
  <p>What I am actually trying to do is allow the option to show any list item in one or two columns based on the choice module I set up on the blog post template. If when creating a blog post you choose 1 column or 2 column, a class in the wrapper inside the loop on the listing page will change accordingly.</p>
  
  <p>the issue I am having is that while the choice module value is available to the listing page template (when in a hubl template module on the blog template, not in the blog post template), and the choice drop down is on the blog editing template and the choice can be made and saved, The listing page only recognizes the default choice and not the choice chosen in the blog editor.</p>
  
  <p>half way through writing this I decided to move the choice module to the blog page template from the main blog template and now the variable for the choices is unavailable to the listing page. Keeping the choice module in the main blog template outside of the blog page template makes the variable for the choice available but not individually by the blogs. Because the choices chosen on the blogs aren't saved per blog, only the default choice is available.</p>
  
  <p>It would be great if there was a way to add it to the content variables so that you could do something like</p>
  
  <pre><code>{{ content.widget_data.foo.value }}
  </code></pre>
  
  <p>within the contents loop, making the individual choices of the blog posts available.</p>
  
  <p>any ideas?</p>