Link info: https://docs.expressionengine.com/latest/urls/url_structure.html#entries-and-other-things
The template all and the template view inside are very similar to each other only the channel display changes but for all the form is shown with the generation of the fields from the other channels but it does not work if the url also has the name of an article.
__view-layout
{layout='layouts/_html-wrapper'}
{!-- Variabili Immobili --}
{preload_replace:i_url='immobili'}
{preload_replace:i_url_view='view'}
{preload_replace:s_url='immobili'}
{preload_replace:s_url_search='search'}
{!-- embed for breadcrumb, needed to pass arguments (embeds aren't evil) --}
{layout:set name='breadcrumbs'}
{embed='common/_breadcrumb'
p_url='{layout:p_url}'
p_title='{layout:p_title}'
{if layout:entry_ch}entry_ch='{layout:entry_ch}'{/if}
}
{/layout:set}
<section id="immobili">
<div class="container">
<div class="row">
<div class="col-md-8">
{layout:contents}
</div>
<!-- Sidebar -->
<div class="col-md-4">
<h1>Sidebar</h1>
{sidebar}
</div>
</div>
</div>
</section>
View Picture mysite.it/template => mysite.it/immobili the Partial Template works fine. Example
{layout='layouts/_view-layout'}
{!-- page vars --}
{preload_replace:p_title='My Blog'}
{preload_replace:p_description='Search Results'}
{preload_replace:p_url='immobili'}
{preload_replace:p_url_entry='view'}
{!-- channel vars (prefix ch_) --}
{preload_replace:ch='immobili'}
{!-- layout vars, channel/page related --}
{layout:set name='ch' value='{ch}'}
{layout:set name='p_url' value='{p_url}'}
{layout:set name='p_title' value='{p_title}'}
{layout:set name='search' value='y'}
{!-- layout vars --}
{layout:set name='title' value='search results{gv_sep}{p_title}{gv_sep}'}
{layout:set name='description' value='{p_description}'}
{!-- require_entry makes it so if someone types the wrong URL, they will get a 404 page --}
{exp:channel:entries channel='{ch}' limit='1' require_entry='yes'}
{!-- layout vars, dynamic, not output --}
{layout:set name='title' value='{title}'}
{layout:set name='description' value='{seo_desc}'}
{layout:set name='entry_ch' value='{ch}'}
{!-- OpenGraph meta output --}
{layout:set name='og_title' value='{seo_title}'}
{layout:set name='og_url'}{path='{p_url}'}{/layout:set}
{layout:set name='og_description' value='{seo_desc}'}
{!-- /layout vars, dynamic, not output --}
{!-- content output --channel="comuni"}
<option <h1>value="{title}</h1>
{!-- image (GRID) --}
{if blog_image}
{blog_image}
<figure>
<img src="{blog_image:image}" alt="{blog_image:caption:attr_safe}">
<figcaption>{blog_image:captiontitle}</figcaption>
</figure>
{/blog_image}
{/if}
{blog_content}
{!-- /content output --}
{!-- no results redirect --}
{if no_results}
{redirect='404'}
{/if} option>
{/exp:channel:entries}
this code works and generate the field's option.
Instead into picture mysite.it/template_group/template/my_url_title => mysite.it/immobili/view/villa-alessandro the Partial Template NOT works.