Output to select?

Hello, please tell me, is it possible to withdraw such a link in select2?
{if isset($categories_array) && $categories_array|@count}

{if !$seo_settings.enable_mod_rewrite}{if $constructed_url|strchr:"?"}{assign var="separator" value="&"}{else}{assign var="separator" value="?"}{/if}{/if}

{foreach from=$categories_array item=v name="categories_list"}
<div class="property">

<a href="{if $seo_settings.enable_mod_rewrite}{seo->makeSearchCategoryLink p1=$v.id p2=$v.name}{else}{$constructed_url}{$separator}category={$v.id}{/if}" class="sdjbfkj_JKJ_j">#{$v.name}</a>

</div>
{if $categories_array|@count>10 && $smarty.foreach.categories_list.index==9}
<div id="more_categories_link"><a id="more_categories" class="more_link sdjbfkj_JKJ_j" href="javascript:;">{$lng.search.more}</a></div>
<div style="display: none;" id="more_categories_list">
{/if}
{/foreach}


Tried so, but displays each line in a separate select

<div class="property">
{literal}
<link href="https://site.ru/select/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://site.ru/select/dist/js/select2.min.js"></script>
the <script>
$(document).ready(function() {
$('.tests45').select2();
});
</script>
{/literal}

<select class="tests45">
 <option value="{if $seo_settings.enable_mod_rewrite}{seo->makeSearchCategoryLink p1=$v.id p2=$v.name}{else}{$constructed_url}{$separator}category={$v.id}{/if}" >{$v.name}</option>
</select>


What to do in this situation?
March 20th 20 at 11:49
0 answer

Find more questions by tags Smarty