My idea is it to change e.g. the headline of a page just for this specific call.
$page->headline('new headline');
or
$page->headline()->set('new headline');
or
$page->content('headline', 'new headline');
I want to use this for using the text file as default values and update the content if necessary.
Greetings and thanks for you ideas 
You can update field values via $page->update();
but I donāt get why youāld want to do that in a controller?
Letās say you have a page with a availability info of a service - usually this service is running but before you render the page you call an API to check it if the API is running or not wit the intention to change the value if notā¦
Ok, I wouldnāt store the availability
as a field value, but retrieve it from the endpoint for each call (and perhaps cache it for a certain amount of time). But be aware that this could slow down render time.
Or maybe even handle this in the front-end via AJAX if is not āmission-criticalā. Then you could still leverage server-side caching.
Youāre right it is more a historic āissueā because authors wanted to change the message. Yeah, but I can return a variable with the updated contentā¦
Sorry but Iām checking all the changes to v3 and it is a lot behind the curtainā¦
You could set 2 text fields: successmessage
and failmessage
that authors can alter.
Depending on the result of the endpoint, you can choose which message should be shown (be it in the backend or frontend).
Yes, might be an other solutionā¦
Iām checking: https://getkirby.com/docs/guide/templates/page-models
Maybe I can have an even better solutionā¦
Yes is is - an even more cleanā¦