I've created two separate Structure entries, both using the Page template below with Relationship entries. It works fine if I only want one page, but I've made a second page to pull different Relationship entries for each page, but now it's just pulling the same relationship entries for both pages. I tried using entry_id="{entry_id}
in the {exp:channel:entries}
on the recipe_ajax/index
template and that didn't work...only works when I explicitly write the id.
Is there another way to parse the ajax template so that I can use the dynamic entry_id="{entry_id}
to pull correct entries? Or am I missing something completely obvious?
Here's my Page template:
{embed="layouts/index"}
{!-- PAGE CONTENT --}
{exp:stash:set parse_tags="yes"}
{exp:channel:entries cache="no" refresh="60" disable="category_fields|member_data|pagination"}
{stash:content}
<div class="recipes-section add">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="article-holder row" id="container">
{recipes_landing_recipes limit="15"}
<div class="grid-item article col-xs-12 col-sm-4 col-md-3 all {recipes_landing_recipes:categories}{exp:streeng slug='yes'}{category_name} {/exp:streeng} {/recipes_landing_recipes:categories}">
<a href="{route='recipes/recipe_detail' title='{recipes_landing_recipes:url_title}'}">
<div class="img-holder">
<img src="{if recipes_landing_recipes:recipe_featured_image}{recipes_landing_recipes:recipe_featured_image}{if:else}/assets/images/bsl-placeholder.jpg{/if}
" height="366" width="342" alt="{recipes_landing_recipes:title}">
</div>
<strong class="title">{recipes_landing_recipes:title}</strong>
</a>
</div>
{/recipes_landing_recipes}
</div>
<a class="btn btn-danger btn-load" href="{path='recipe_ajax/index'}" style="display: none;">view more</a>
</div>
</div>
</div>
</div>
{/stash:content}
{/exp:channel:entries}
{/exp:stash:set}
And here's the recipe_ajax/index
template:
{exp:channel:entries channel="recipes_landing" cache="no" refresh="60" disable="categories|category_fields|member_data|pagination}
<div class="post-section">
{recipes_landing_recipes offset="15"}
<div class="grid-item article col-xs-12 col-sm-4 col-md-3 all {recipes_landing_recipes:categories}{exp:streeng slug='yes'}{category_name} {/exp:streeng} {/recipes_landing_recipes:categories}">
<a href="{route='recipes/recipe_detail' title='{recipes_landing_recipes:url_title}'}">
<div class="img-holder">
<img src="{if recipes_landing_recipes:recipe_featured_image}{recipes_landing_recipes:recipe_featured_image}{if:else}/assets/images/bsl-placeholder.jpg{/if}" height="366" width="342" alt="{recipes_landing_recipes:title}">
</div>
<strong class="title">{recipes_landing_recipes:title} {recipes_landing_recipes:entry_id}</strong>
</a>
</div>
{/recipes_landing_recipes}
</div>
{/exp:channel:entries}
UPDATED ANSWER:
I was able to resolve by calling the entry_id_path in the Page template {entry_id_path='recipe_ajax/index'}
and referencing this path in the ajax file like so entry_id_path="{entry_id_path}