New tab for the top menu

To add a new tab (for example, the "Site map" tab) to the top menu:
  1. Open the top_menu.tpl file located in the skins/[CUSTOMER_ACTIVE_SKIN]/customer directory of your CS-Cart installation, where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.
  2. Add the following part of the code there:
    {if $target == 'sitemap'}
    {assign var='but_active' value='-active'}
    {else}
    {assign var='but_active' value=''}
    {/if}
    <div class="top-menu{$but_active}-left-bg">
    <div class="top-menu{$but_active}-right-bg">
    <div class="top-menu{$but_active}-bg"
    onclick="fn_redirect('{$index_script}?{$target_name}=sitemap');">
    <a href="{$index_script}?{$target_name}=sitemap"
    class="top-menu-title">{$lang.sitemap}</a>
    </div>
    </div>
    </div>

    above for example this line of the code:
    {if $target == 'profiles' || $target == 'auth'}
  3. Save the file.
To change this code for your own tab replace:

- {$lang.sitemap} with your tab name;
- {$index_script}?{$target_name}=sitemap with the link to your page.

NOTE: This example is for the Basic skin. The code in the other skins is different.

Noticed an error in the article or it is not clear enough? Any suggestions to improve it? Please let us know by filling in the feedback form. Click here.