Background: I've inherited a site built in craft that has a page called "updates" with a button to load additional entries through ajax. The updates page is an entry in the "page" structure and when it's template is called it loads entries stored in a channel also called "updates". The template the "pages" structure points to is pages/_entry.html, and this holds the logic for gathering entries stored in the "updates" channel. However, the ajax script calls /updates/q?param=1 which is somehow calling the template updates/index.html. All while the channel is set to call template entries/_entry.html for the individual entries in the channel.
So I tried to create a blog page that would work the same way. I created an entry in the "pages" structure called blog, then created the template blog/index.html which is the same as updates/index.html. The ajax script calls /blog/q?param=1 but it returns a 404. I even created a channel in the cms called blog wondering if that was the case but it hasn't helped. What does the url need to be to return blog/index.html?
pages/_entry.html
{% extends "_layout" %}
{% block content %}
{% set myJs %}
window.entryType = '{{ entry.type }}';
{% endset %}
{% includeJs myJs %}
{% cache unless craft.config.devMode %}
{% if entry.type != 'contact' %}
{% include ['_partials/_page-header-' ~ entry.type, '_partials/_page-header'] %}
{% endif %}
{% include ['_partials/_page-content-' ~ entry.type, '_partials/_page-content' ] %}
{% endcache %}
{% endblock %}
updates/index.html
{% if craft.request.isAjax %}
{% set layout = "_ajax" %}
{% else %}
{% set layout = "_layout" %}
{% endif %}
{% extends layout %}
{% set title = 'Updates' %}
{% block content %}
{% cache for 3 hours unless craft.config.devMode %}
{% if craft.request.isAjax %}
{% include '_partials/_get-updates' %}
{% else %}
{% set entry = craft.entries.slug('updates').featuredUpdate %}
<section class="l-section u-bg--light-gray">
<div class="l-container">
{% include '_partials/_updates-filter' %}
{% include '_partials/_grid-cards' %}
<div class="l-section__cta">
<a href="#" class="btn btn--large" id="load-more">Load More</a>
</div>
</div>
</section>
{% endif %}
{% endcache %}
{% endblock %}