App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi,
I wanted to create something like this : https://www.silkjewellery.com/sitemap
I saw a post here in the community that uses menu links to achieve this but I want to automatically create it (not listing it one by one). Is there an app that can do that?
You could loop through the various objects to create something similar without the need for an external app.
<h1>Sitemap</h1>
<ul class="sitemap">
<!-- Loop through Pages -->
<li>Pages
<ul>
{% for page in pages %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
</li>
<!-- Loop through Collections and Products -->
<li>Collections
<ul>
{% for collection in collections %}
<li><a href="{{ collection.url }}">{{ collection.title }}</a>
<ul>
{% for product in collection.products %}
<li><a href="{{ product.url }}">{{ product.title }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>
<!-- Loop through Blogs and Articles -->
<li>Blogs
<ul>
{% for blog in blogs %}
<li><a href="{{ blog.url }}">{{ blog.title }}</a>
<ul>
{% for article in blog.articles %}
<li><a href="{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>
</ul>
Hope this helps
Simon