Copy link to clipboard
Copied
Hi
I've created a webapp called case-studies. It works fine and lists case study pages.
All I want to do is now list all the case studies on a different part of the site, so essentially access names and urls of all case studies created by that webapp.
I tried using this code:
{module_data resource="pages" version="v3" fields="pageUrl,name" skip="0" limit="500" where="\{'pageUrl':\{'$beginsWith':'/case-studies/'\}\}" order="id" collection="myData"}
<ul id="main-menu">
{% for item in myData.items%}
<li><a href="{{item.pageUrl}}">{{item.name}}</a></li>
{% endfor %}
</ul>
But I guess it doesn't work because the case studies pages aren't technically "pages" just db references.
Could anyone advise an alternative?
many thanks for any help.
Copy link to clipboard
Copied
solved - I did this using the inbuilt toolbox function in the editor and used the backup list template to style accordingly.