I think that you are looking for a Markup Control, see the docs for more details: https://www.dotvvm.com/docs/tutorials/control-development-markup-only-controls/2.0
In short, markup control allows you to declare custom control in a dothtml file. You can use all DotVVM features in the markup control, you'll just have to explicitly declare how data from the view model should be passed if you want to use data bindings.
A minimalist markup control may look like this:
<!-- The control must be used when data context is this view model: -->
@viewModel Full.Name.Of.MyViewModelBase
<ul class=menu>
<li>{{value: NameOfSomething}}</li>
<li>...</li>
</ul>
Then, the control must be registered, so DotVVM can find it:
// in DotvvmStartup
config.Markup.AddMarkupControl(tagPrefix: "cc", tagName: "MyMenu", "Views/MyMenu.dotcontrol");
After that, you can use the control anywhere you want (well, recursion works only sometimes ):
<cc:MyMenu />
You can also declare properties and then use it inside the control. It may help with reusability of the control since the view model does not have to fit. I'll leave it to the docs