How can I access a template variable from an include that is loaded via ajax? I am making an ajax request to an entry. It is returning the entry's html - and all is working great.

I have a section called "portfolio" and I loop through each:

portfolio/index.twig

{% set projects = craft.entries.section('portfolio') %}
...
{% for project in projects %}   
    ...
    &lt;a href="#!{{ project.slug }}" class="hover-overlay"&gt;
    ...
{% endfor %}


When the project is clicked, I am making an ajax request to an entry. It is returning the entry's html - and all is working great.

Now I would like to strip out the static html, and access the parent's entry variable.

For example, here is the html that I am returning.

portfolio/_entry.twig

&lt;div class="item-content"&gt;
    &lt;div class="container"&gt;
        &lt;h3&gt;My Project&lt;/h3&gt;
        &lt;div class="row"&gt;
        &lt;div class="col-md-9"&gt;
            {# image will go here. #}
        &lt;/div&gt;
        &lt;div class="col-md-3"&gt;
            &lt;h4&gt;My Project Description&lt;/h4&gt;
            &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eros dolor, efficitur lobortis eros et, dictum hendrerit nulla.&lt;/p&gt;
            &lt;p&gt;Client: My Client&lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;




What I would like to do is:

...
&lt;h3&gt;{{ project.title }}&lt;/h3&gt;


I'm not sure how to do is something like this from within portfolio/_entry.twig

{% set project = ?? %}


So that I can use {{ project.title }}

Thank you for any suggestions!
Since you are only trying to access the existing entry model, you should be able to do something like this:

portfolio/_entry.twig

{% set project = entry %}
...
&lt;h1&gt;{{ project.title }}&lt;/h1&gt;