Jump to content

Вывод брендов на отдельной странице с разбивкой по буквам


Recommended Posts

Помогите сделать вывод брендов на отдельной странице с разбивкой по буквам как тут http://klubkrasoti.ru/all_vendors/
Я нашел такое решение http://blog.rlstudio.com/2011/09/simpla-2-0-vse-brendy/. Но сдесь нет букв.
Помогите буквы доделать. Заранее спасибо!

Link to post
Share on other sites
{get_brands var=all_brands}
{if $all_brands}
<ul class="brands">
{assign var=letter value=''}
<li><ul>
{foreach name=brands item=b from=$all_brands}
{assign var=firstletter value=$b->name|upper|mb_substr:0:1}
{if $firstletter != $letter}
{assign var=letter value=$firstletter}</ul></li><li>{$letter}<ul>
{/if}
<li><a href="brands/{$b->url}">{$b->name}</a></li>
{/foreach}
</ul></li>
</ul>
{/if}
Можно было бы и у автора спросить :)
Link to post
Share on other sites
  • 3 weeks later...

<div id="myslidemenu" class="jqueryslidemenu">             {get_brands var=all_brands}                {if $all_brands}                       <ul>                       {assign var=letter value='A'}                        <li>A<ul>                       {foreach name=brands item=b from=$all_brands}                       {assign var=firstletter value=$b->name|upper|substr:0:1}                       {if $firstletter != $letter}                       {assign var=letter value=$firstletter}</ul></li><li>{$letter|regex_replace:"/[Р]/":"А - Я "}<ul>                       {/if}                        <li><a href="brands/{$b->url}">{$b->name}</a></li>                        {/foreach}                        </ul></li>                    </ul>                {/if}</div>

решил
Link to post
Share on other sites
  • 2 months later...
  • 2 years later...
  • 5 months later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...