Yes.
I am assuming you have copied a sample of an edit view and haven't properly removed the lines of code relevant to loading a Form and Data and that is why you are getting a file not found
message.
In its simplest form a Joomla 4 View needs to only have a display()
method
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
class HtmlView extends BaseHtmlView
{
public function display($tpl = null): void
{
parent::display($tpl);
}
}
and a template file in called default.php
, eg. \tmpl\help\default.php
, to be displayed.
<?php
defined('_JEXEC') or die;
?>
<div>
<p>Hello</p>
</div>
This will use the DisplayController, it does not need its own controller.
As @Sharky suggests in his comment, providing the code that you have written or are modifying in your question would make it easier to help you and provide more specific answer rather than us assuming what code you have.