🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Parsed/Mounted ViewModel
This page was created by PageReplicator on 2025-09-01. Last edited by PageReplicator on 2025-09-01.

Template:Notice




You can insert a <a href="/Training:ViewModel" title="Training:ViewModel" data-bs-title="Training:ViewModel">ViewModel</a> within another ViewModel at any point where the column in the ViewModel is an <a href="/Documentation:Objects" title="Documentation:Objects" data-bs-title="Documentation:Objects">object</a> and there's no associated ViewModel <a href="/Documentation:Class" title="Documentation:Class" data-bs-title="Documentation:Class">class</a>.

<a href="/File:Documentation_Mounted_ViewModel_1716460258505.png" class="image" data-bs-title="File:Documentation_Mounted_ViewModel_1716460258505.png" data-bs-filetimestamp="20240523103103"><img alt="." src="/images/f/f1/Documentation_Mounted_ViewModel_1716460258505.png" decoding="async" width="644" height="212" /></a>

The result will be the same as if you would repeat all the things from the ViewModel inside a new <a href="/Documentation:Nestings" title="Documentation:Nestings" data-bs-title="Documentation:Nestings">Nesting</a> from the mount-point. The new Nesting will have the same name as the mounted ViewModel.

Note: One limitation on the mounted ViewModel is that you cannot use the <a href="/index.php?title=Built_in_ViewModel_variables&action=view" class="new" title="Built in ViewModel variables (page does not exist)" data-bs-title="Built_in_ViewModel_variables">vCurrent_Root</a> in the mounted (since it is owned by the outer view and has the value of the outer ViewModel).