Andrea's answer is part of the solution!
You'll need to set up a route, either via routes.php
, or via the admin. I tend to prefer PHP routes, so you never have to worry about the functionality being removed from the app due to actions in the CP.
return [
'my/path/<entrySlug:{slug}>' => ['template' => '_my/path/edit-entry']
];
Create a form in templates/_my/path/edit-entry
that contains all the fields you want a user to be able to edit.
This doesn't actually restrict which fields they can update, but you don't have to display everything, if you don't want or need to. The only way to control which fields are updatable is via a custom module/plugin controller.
The edit page should include, at minimum:
{# Find the entry by slug and author: #}
{% set entry = craft.entries({
slug: entrySlug,
authorId: currentUser.id
}).one() %}
{# If the entry wasn't found, or didn't belong to the current user, throw up the 404 page: #}
{% unless entry %}
{% exit 404 %}
{% endunless %}
{# Create a small form with your attributes: #}
<form method="post">
{{ csrfInput() }}
<input type="hidden" name="action" value="entries/save-entry">
<input type="hidden" name="entryId" value="{{ entry.id }}">
<input type="text" name="title" value="{{ entry.title }}">
<input type="text" name="fields[myFieldHandle]" value="{{ entry.myFieldHandle }}">
</form>