I can not get the fields of a channel to be fused in a form.
I created a Partial Template with the following code:
{sidebar}
<form action="{path='{s_url}/{s_url_search}'}" method="GET" id="">
<div class="form-group">
<label>Contratto</label>
<select class="form-control" name="contratto">
<option value="all">Tutti i contratti</option>
<option value="Vendita">Vendita</option>
<option value="Affitto">Affitto</option>
</select>
</div>
<div class="form-group">
<label>Comune</label>
<select class="form-control" name="comune">
<option value="all">Tutti i comuni</option>
{exp:channel:entries channel="comuni"}
<option value="{title}">{title}</option>
{/exp:channel:entries}
</select>
</div>
<div class="form-group">
<label>Tipologia</label>
<select class="form-control" name="tipologia">
<option value="all">Tutte le tipologie</option>
{exp:channel:entries channel="tipologie"}
<option value="{title}">{title}</option>
{/exp:channel:entries}
</select>
</div>
<button type="submit" class="btn btn-sm btn-primary">Cerca</button>
This works if the url is of type mysite.it/Template_Group_name/Template.
It does not work instead if the url is of type mysite.it/Template_Group_name/Template/item
I give an example. I have the Blog Channel where I have the articles inside. example article: Hello Worl The code written above works if I go to mysite.it/blog/all Which shows all the articles But it does not work for mysite.it/blog/view/hello_world showing the article
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.
What is wrong? I also copy the view channel code.
Picture mysite.it/template => mysite.it/immobili the Partial Template works fine. Example
{exp:channel:entries channel="comuni"}
<option value="{title}">{title}</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.