Set Craft variables in the markup I am trying to use Twig methods/loops while working on a design/template. To avoid touching the CP or the DB i did set variables directly in the template, like : 

{% set service = 
  { 
    'titel': 
      [
        'Titel1', 
        'Titel2'
      ],
  }
%}

{% for i in 0..1 %}
  &lt;p&gt;{{ service.headerQuote }}&lt;/p&gt;
{% endfor %}


It would be much better to be able to use the standard Craft methods, so if I move from templating/designing towards the DB i wouldn't have to touch the methods in my markup.  Unfortunately, I can't make it work... I tried:

{% set service = { titel: 
                   [ 
                     'hallo',
                     'hallo2' 
                    ]
                  } 
                %}

{% for entry in craft.entries
      .section('service') %}

      &lt;p&gt;{{ entry.titel }}&lt;/p&gt;

{% endfor %}


I tried to set the service entry to craft.entries.section('service') but that doesn't work as well... what am I missing?

Is it even possible to overwrite Craft variables in the markup?
Just use a variable that has the same keys as the entry model will have.

{% set entries = [{title: 'hello', ...}, {title: 'hello2', ...}] %}

{% for entry in entries %}
    {# stuff #}
{% endfor %}


Then, when you want to move to using the database, just switch what  entries is set to:

{% set entries = craft.entries.section('service') %}


That way the template will still look exactly the same.