Kryptronic Info Center

The Info Center has articles on everything you need to get your site up and running with Kryptronic software. Hundreds of articles are available which contain tips, tricks, software updates and release notes, and everything you ever wanted to know about eCommerce, but were afraid to ask...

Kryptronic

Site Doctor: Display Skins: Adding Custom Menus

Assuming you’d like to add a custom menu (aka skin widget) to the sidemenu of your active desktop skin, follow these instructions. These instructions assume you are using the default Desktop display skin, but are applicable to any desktop skin.

Locate the file:

{public}/skins/Desktop/skin.php

And in that file, locate the PHP code:

<?php $skinfunc->xnamespace('core','skinwidgets','SIDEMENU'); ?>

Either above, or below that code (or in both places), you can add the following to get a link list menu widget. For demonstration purposes, the ID used for the

containing the menu is ‘ecom_skinwidget_menucustom1’. Make sure you use a UNIQUE ID for each

you create.

<div id="ecom_skinwidget_menucustom1" class="skin_widgetclass_SIDEMENU">
<div class="skin_widgettitle">Custom Menu Title</div>
<div class="skin_widgetmenu">
<ul>
<li><a href="LINK1" title="Custom Menu Link 1">Custom Menu Link 1</a></li>
<li><a href="LINK2" title="Custom Menu Link 2">Custom Menu Link 2</a></li>
</ul>
</div>
</div>

You can add the following to get a freeform content widget. For demonstration purposes, the ID used for the

containing the menu is ‘ecom_skinwidget_contentcustom2’. Make sure you use a UNIQUE ID for each

you create.

<div id="cms_skinwidget_contentcustom2" class="skin_widgetclass_SIDEMENU">
<div class="skin_widgettitle">Custom Menu Title</div>
<div class="skin_widgetcontent">
<p>Widget Content.</p>
<p><a href="LINK1" title="Custom Menu Link 1">Custom Menu Link 1</a></p>
</div>
</div>

Obviously, replace LINK1, LINK2 etc. with real links. When linking to pages within the software, it’s best practice to use the following code to print a link. Using the following link code will ensure as your SEO URLs are created and updated, etc. that all links are printed properly.

<?php print $this->link_namespace(APP,NS,PARAMS); ?>

Real life examples:

Link to Product with ID 'XXX': <?php print $this->link_namespace('ecom','prodshow',array('ref'=>'XXX')); ?>
Link to Category with ID 'XXX': <?php print $this->link_namespace('ecom','catshow',array('ref'=>'XXX')); ?>
Link to HTML Page with ID 'XXX': <?php print $this->link_namespace('cms','display',array('ref'=>'XXX')); ?>

Kryptronic: Security. Stability. Reliability