I have entries in a structure section. I'd like the users to view the list of entries without the entries themselves being assigned URLs.
How can I set a URL for the top level of a Structure section without enabling "Entry URL Format"?
If I understand what you're asking—it sounds like you can just disable URLs for that section, and create a template that will get loaded at the URL you want.
For example, if you had a Section called “Plants,” and you wanted to list all plants at mywebsite.com/plants, you could just create craft/templates/plants.twig
:
{% set plants = craft.entries({ section: 'plants', limit: null }).find %}
<ul>
{% for plant in plants %}
<li>{{ plant.title }}</li>
{% endear %}
</ul>
If you need to edit anything on that page, you'll need to create another entry (probably a Single) to manage that content.
A section in Craft (regardless of it is a Single, Channel or Structure section) is defined by a combination of your Craft Site URL (defined under Settings->General
or overwritten via https://craftcms.com/docs/config-settings#siteUrl) and that section's "Entry URL Format" under the section's settings (Settings->Sections->(your structure section)->Entry URL Format
).
You can read more about them here: https://craftcms.com/docs/sections-and-entries