Home Look and feel (design) Tabs New tab for the top menu
New tab for the top menu
To add a new tab (for example, the "Site map" tab) to the top menu:
- 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.
- 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'} - 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.
